(a) The court must rule on a motion under Section 27.003 not later than the 30th day following the date the hearing on the motion concludes.
(b) Except as provided by Subsection (c), on the motion of a party under Section 27.003, a court shall dismiss a legal action against the moving party if the moving party demonstrates that the legal action is based on or is in response to:
(c) The court may not dismiss a legal action under this section if the party bringing the legal action establishes by clear and specific evidence a prima facie case for each essential element of the claim in question.
(d) Notwithstanding the provisions of Subsection (c), the court shall dismiss a legal action against the moving party if the moving party establishes an affirmative defense or other grounds on which the moving party is entitled to judgment as a matter of law.