(1) Any term of confinement imposed for an offense which exceeds thirty days shall be served under the supervision of the department. If the period of confinement imposed for more than one offense exceeds thirty days but the term imposed for each offense is less than thirty days, the confinement may, in the discretion of the court, be served in a juvenile facility operated by or pursuant to a contract with the state or a county.
(2) Whenever a juvenile is confined in a detention facility or is committed to the department, the court may not directly order a juvenile into a particular county or state facility. The juvenile court administrator and the secretary or the secretary's designee, as appropriate, has the sole discretion to determine in which facility a juvenile should be confined or committed. The counties may operate a variety of detention facilities as determined by the county legislative authority subject to available funds.