A director who is a party to a proceeding by reason of being a director may apply for indemnification or an advance for expenses to the court conducting the proceeding or to another court of competent jurisdiction. After receipt of an application and after giving any notice it considers necessary, the court shall:
If the court determines that the director is entitled to indemnification under subdivision (1) or to indemnification or advance for expenses under subdivision (2), the court shall also order the corporation to pay the director's reasonable expenses incurred in connection with obtaining court-ordered indemnification or advance for expenses. If the court determines that the director is entitled to indemnification or advance for expenses under subdivision (3), the court may also order the corporation to pay the director's reasonable expenses to obtain court-ordered indemnification or advance for expenses.
SDCL 47-1A-854