A copy of the written application for detainment and a written explanation of the person's right to counsel must be given to the person within twenty-four hours after detainment by the administrator, who shall provide a reasonable opportunity for the person to consult counsel.
SDCL 34-20A-67