; (II) enforce compliance with such rule; (III) on behalf of residents of the State, obtain damages, restitution, or other compensation; or (IV) obtain such other legal or equitable relief as the court may consider to be appropriate. (ii) Notice (I) In general Before filing an action under clause (i), the attorney general of the State involved shall provide to the Commission— (aa) written notice of that action; and (bb) a copy of the complaint for that action. (II) Exemption (aa) In general Subclause (I) shall not apply with respect to the filing of an action by an attorney general of a State under this subparagraph if the attorney general of the State determines that it is not feasible to provide the notice described in that subclause before the filing of the action. (bb) Notification In an action described in item (aa), the attorney general of a State shall provide notice and a copy of the complaint to the Commission at the same time as the attorney general files the action. (B) Intervention (i) In general On receiving notice under subparagraph (A)(ii), the Commission shall have the right to intervene in the action that is the subject of the notice. (ii) Effect of intervention If the Commission intervenes in an action under clause (i), it shall have the right— (I) to be heard with respect to any matter that arises in that action