What is the grammatical role of idhā here?

Arabic Syntax Practicum — Parsing Passages from Ten Maqāmāt