It's important for her to leave right away.

Literal

She [topic-は] right-away depart [thing-事] [subject-が] important is.

The pattern ~ことが重要だ ('it is important that...') uses こと to nominalize the embedded clause すぐに出発する ('to leave right away'), then が marks that whole nominalized clause as the grammatical subject of 重要だ ('is important'). Note 事 is sometimes written in kanji for emphasis or in formal contexts; the same word in hiragana こと is more common in everyday writing. The dual subject is one of Japanese's hallmark constructions: 彼女は as the discourse topic, plus the embedded clause as the predicate's logical subject.