(a) A responsible person commits the crime of chemical endangerment of exposing a child to an environment in which he or she does any of the following:
(1) Knowingly, recklessly, or intentionally causes or permits a child to be exposed to, to ingest or inhale, or to have contact with a controlled substance, chemical substance, or drug paraphernalia as defined in Section 13A-12-260. A violation under this subdivision is a Class C felony.
(2) Violates subdivision (1) and a child suffers serious physical injury by exposure to, ingestion of, inhalation of, or contact with a controlled substance, chemical substance, or drug paraphernalia. A violation under this subdivision is a Class B felony.
(3) Violates subdivision (1) and the exposure, ingestion, inhalation, or contact results in the death of the child. A violation under this subdivision is a Class A felony.
(b) The court shall impose punishment pursuant to this section rather than imposing punishment authorized under any other provision of law, unless another provision of law provides for a greater penalty or a longer term of imprisonment.
(c) It is an affirmative defense to a violation of this section that the controlled substance was provided by lawful prescription for the child, and that it was administered to the child in accordance with the prescription instructions provided with the controlled substance.