(a) Restraints on the freedom of a child prior to adjudication shall be imposed only when there is probable cause to believe that a child committed the act of which he or she is accused, there is clear and convincing evidence that such child's freedom should be restrained, that no less restrictive alternatives will suffice, and:
(1) Such child's detention or care is required to reduce the likelihood that he or she may inflict serious bodily harm on others during the interim period; or
(2) Such child's detention is necessary to secure his or her presence in court to protect the jurisdiction and processes of the court.
(b) A child alleged to be a child in need of services shall not be detained:
(1) To punish, treat, or rehabilitate such child;
(2) To allow his or her parent, guardian, or legal custodian to avoid his or her legal responsibilities;
(3) To satisfy demands by a victim, law enforcement, or the community;
(4) To permit more convenient administrative access to him or her;
(5) To facilitate further interrogation or investigation; or
(6) Due to a lack of a more appropriate facility.
(c) Whenever a child alleged to be a child in need of services cannot be unconditionally released, conditional or supervised release that results in the least necessary interference with the liberty of such child shall be favored over more intrusive alternatives.
(d) Whenever the curtailment of the freedom of a child alleged to be a child in need of services is permitted, the exercise of authority shall reflect the following values:
(1) Respect for the privacy, dignity, and individuality of such child and his or her family;
(2) Protection of the psychological and physical health of such child;
(3) Tolerance of the diverse values and preferences among different groups and individuals;
(4) Assurance of equality of treatment by race, class, ethnicity, and sex;
(5) Avoidance of regimentation and depersonalization of such child;
(6) Avoidance of stigmatization of such child; and
(7) Assurance that such child has been informed of his or her right to consult with an attorney and that, if the child is an indigent person, an attorney will be provided.
(e) If a child alleged to be a child in need of services can remain in the custody of his or her parent, guardian, or legal custodian through the provision of services to prevent the need for removal, the court shall order that such services shall be provided.