(a) Notwithstanding any other law except as provided by Subsection (b), this state has sovereign immunity, a political subdivision has governmental immunity, and an officer, employee, or agent of this state or a political subdivision has official immunity in an action, claim, counterclaim, or any type of legal or equitable action that:
(1) challenges the validity of any provision or application of this chapter, on constitutional grounds or otherwise; or
(2) seeks to prevent or enjoin this state, a political subdivision, or an officer, employee, or agent of this state or a political subdivision from:
(A) enforcing any provision or application of this chapter; or
(B) hearing, adjudicating, or docketing an action brought under Section 3002.104 or 3002.105 for a violation of this chapter.
(b) Subsection (a) does not apply if:
(1) immunity has been abrogated or preempted by federal law in a manner consistent with the United States Constitution; or
(2) sovereign immunity of this state and governmental immunity of a political subdivision to suit and from liability have been waived in accordance with this chapter.