1. Dismissal with prejudice. In ruling on a motion under section 734, the court shall dismiss with prejudice a cause of action, or part of a cause of action, if:
A. The moving party establishes under section 733, subsection 2 that this Act applies;
B. The responding party fails to establish under section 733, subsection 3 that this Act does not apply; and
C. Either:
(1) The responding party fails to establish a prima facie case as to each essential element of the cause of action; or
(2) The moving party establishes that:
(a) The responding party failed to state a cause of action upon which relief can be granted; or
(b) There is no genuine issue as to any material fact and the moving party is entitled to judgment as a matter of law on the cause of action or part of the cause of action.
2. Dismissal without prejudice; right to costs, attorney's fees and expenses. A voluntary dismissal without prejudice of a responding party's cause of action, or part of a cause of action, that is the subject of a motion under section 734 does not affect a moving party's right to obtain a ruling on the motion and seek costs, attorney's fees and expenses under section 740.
3. Dismissal with prejudice; prevailed on motion. A voluntary dismissal with prejudice of a responding party's cause of action, or part of a cause of action, that is the subject of a motion under section 734 establishes for the purpose of section 740 that the moving party prevailed on the motion.