A. The court may order a juvenile to participate in an outpatient or inpatient competency restoration program or may commit the juvenile for competency restoration to the state hospital or another facility. The juvenile court shall approve all competency restoration programs. In determining the type and location of the program, the court shall select the least restrictive alternative after making a finding of probable cause and considering the following:
1. If confinement is necessary for program participation.
2. If the juvenile meets the civil commitment criteria under title 36, chapter 5.
B. The court may appoint a guardian ad litem for a juvenile who is ordered to participate in an inpatient or outpatient program pursuant to this section. The guardian ad litem shall both:
1. Coordinate the continuity of care following restoration.
2. In cooperation with the restoration program, advise the court on matters relating to the appropriateness of the form and location of the program and, on request of the court, shall submit a written report. The court shall distribute copies of any report to the prosecutor and the defense attorney. The privilege against self-incrimination applies to all reports and communications with the juvenile.
C. An order entered pursuant to this section shall state if the juvenile is incompetent to refuse treatment pursuant to section 13-4511, including medication.
D. The state shall pay the costs of an inpatient competency restoration program at the state hospital until either:
1. Ten days, excluding Saturdays, Sundays or other legal holidays, after the hospital submits a report to the court stating that the juvenile has regained competence or that there is no substantial probability that the juvenile will regain competency within six months after the date of the original finding of incompetency.
2. The restoration order expires.
3. Seven days, excluding Saturdays, Sundays or other legal holidays, after the charges are dismissed.
E. The state shall pay the costs of a restoration program for a juvenile who is a ward of the court unless the court orders otherwise. If the court orders otherwise, the county shall pay the costs of the restoration program, or if the proceeding arises out of municipal court, the political subdivision shall pay the costs of the restoration program.
F. A restoration order that is issued pursuant to this section is valid for one hundred eighty days from the date of the initial finding of incompetency or until one of the following occurs, whichever occurs first:
1. The restoration program submits a report that the juvenile has regained competency or that there is no substantial probability that the juvenile will regain competency within the period of the order.
2. The charges are dismissed.
3. The juvenile reaches eighteen years of age.