(a) An allegedly delinquent child, dependent child, or child in need of supervision lawfully taken into custody shall immediately be released, upon the ascertainment of the necessary facts, to the care, custody, and control of the parent, legal guardian, or legal custodian of the child or other suitable person able to provide supervision and care for the child, unless the juvenile court or juvenile court intake officer, subject to the limitations in Section 12-15-208, finds any of the following:
(1) The child has no parent, legal guardian, legal custodian, or other suitable person able to provide supervision and care for the child.
(2) The release of the child would present a clear and substantial threat of a serious nature to the person or property of others and where the child is alleged to be delinquent.
(3) The release of the child would present a serious threat of substantial harm to the child.
(4) The child has a history of failing to appear for hearings before the juvenile court.
(5) The child is alleged to be delinquent for possessing a pistol, short-barreled rifle, or short-barreled shotgun, in which case the child may be detained in a juvenile detention facility until the hearing required by Section 12-15-207. Pistol as used in this section shall be as defined in subdivision (1) of Section 13A-11-70. Short-barreled rifle and short-barreled shotgun as used in this section shall be as defined in Section 13A-11-62.
(b) The criteria for continuing the allegedly delinquent child or child in need of supervision in detention or shelter or other care, or for continuing the allegedly dependent child in shelter or other care, as set forth in subsection (a) shall govern the decisions of all persons involved in determining whether the continued detention or shelter care is warranted pending juvenile court disposition and those criteria shall be supported by clear and convincing evidence in support of the decision not to release the child.
(c) In releasing a child, a juvenile court or the juvenile court intake officer may impose restrictions on the travel, association, or place of abode of the child or place the child under the supervision of a department, agency, or organization agreeing to supervise him or her, and may place the child under supervision such as electronic or telephone monitoring, if available. A child, once placed in detention, may also be released pursuant to the same conditions should there be a need to release the child from a juvenile detention facility because of an overcrowded population.