(1) A person arrested upon a warrant pursuant to section 71-940 shall not be delivered to a demanding state until he or she is notified of the demand for his or her surrender and has had an opportunity to apply for a writ of habeas corpus. If an application is filed, notice of the time and place for hearing on the writ shall be given to the county attorney of the county where the arrest was made. The person arrested shall have the right to counsel and the right to have counsel appointed for him or her if the person is indigent. Pending the determination of the court upon the application for the writ, the person detained shall be maintained in a suitable facility as described in section 71-919 or a hospital for persons with mental illness.
(2) At a hearing on a writ of habeas corpus, the State of Nebraska shall show that there is probable cause to believe that (a) such person is absent without authorization from a treatment facility or program for persons with mental illness or substance dependence to which he or she was committed located in the demanding state, (b) the demanding state has reason to believe that such person is currently dangerous to himself, herself, or others, and (c) the demanding state is willing to accept the person back for further treatment.