Sec. 1. (a) This chapter applies only to a child alleged to be a delinquent child.
(b) This chapter does not apply to a child less than twelve (12) years of age unless:
(1) the child poses an imminent risk of harm to the community; or
(2) the court makes a written finding that detention is essential to protect the community and no reasonable alternatives exist to reduce the risk.