Sec. 8. Upon the filing of a petition for commitment under IC 12-26-6 or IC 12-26-7 or the filing of a report under IC 12-26-3-5, the individual may be detained in an appropriate facility:
(1) by an order of the court pending a hearing; or
(2) pending an order of the court under:
(A) IC 12-26-3-6; or
(B) IC 12-26-5.