On termination of the derivative proceeding the court may:(1) Order the corporation to pay from the amount recovered in the derivative proceeding by the corporation the plaintiff’s reasonable expenses, including reasonable attorney fees and costs, incurred in the derivative proceeding if it finds that, in the derivative proceeding, the plaintiff was successful in whole or in part; or
(2) Order the plaintiff to pay any of the defendant’s reasonable expenses, including reasonable attorney fees and costs, incurred in defending the proceeding if it finds that the proceeding was commenced or maintained without reasonable cause or for an improper purpose.