[Accordion] prevent the opening sections with a condition

[Accordion] prevent the opening sections with a condition

Hi,

I

would like to block the opening sections of the accordion after a condition.
Is it possible?

thanks