(a) On request of a person aggrieved, an agency shall issue a declaratory ruling as to the validity of a rule or as to the applicability to a given state of facts of a statute administered by the agency or of a rule or order of the agency. Upon request, an agency shall also issue a declaratory ruling to resolve a conflict or inconsistency within the agency regarding an interpretation of the law or a rule adopted by the agency. The agency shall prescribe in its rules the procedure for requesting a declaratory ruling and the circumstances in which rulings shall or shall not be issued. A declaratory ruling is binding on the agency and the person requesting it unless it is altered or set aside by the court. An agency may not retroactively change a declaratory ruling, but nothing in this section prevents an agency from prospectively changing a declaratory ruling.
(a1) An agency shall respond to a request for a declaratory ruling as follows:
(1) Within 30 days of receipt of the request for a declaratory ruling, the agency shall make a written decision to grant or deny the request. If the agency fails to make a written decision to grant or deny the request within 30 days, the failure shall be deemed a decision to deny the request.
(2) If the agency denies the request, the decision is immediately subject to judicial review in accordance with Article 4 of this Chapter.
(3) If the agency grants the request, the agency shall issue a written ruling on the merits within 45 days of the decision to grant the request. A declaratory ruling is subject to judicial review in accordance with Article 4 of this Chapter.
(4) If the agency fails to issue a declaratory ruling within 45 days, the failure shall be deemed a denial on the merits, and the person aggrieved may seek judicial review pursuant to Article 4 of this Chapter. Upon review of an agency’s failure to issue a declaratory ruling, the court shall not consider any basis for the denial that was not presented in writing to the person aggrieved.