(1) In ruling on a motion under RCW
4.105.020, the court shall dismiss with prejudice a cause of action, or part of a cause of action, if:
(a) The moving party establishes under RCW
4.105.010(2) that this chapter applies;
(b) The responding party fails to establish under RCW
4.105.010(3) that this chapter does not apply; and
(c) Either:
(i) The responding party fails to establish a prima facie case as to each essential element of the cause of action; or
(ii) 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) 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 RCW
4.105.020 does not affect a moving party's right to obtain a ruling on the motion and seek costs, attorneys' fees, and expenses under RCW
4.105.090.
(3) 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 RCW
4.105.020 establishes for the purpose of RCW
4.105.090 that the moving party prevailed on the motion.