I'm trying to build some kind of switch which will enable specific ui_iFrame based on value in flow context. For example if (flow.get('agv_status') === "offline") --> disable ui_iFrame 1-3 and enable number 4.
Then in your implementation, get the iFrame object and manipulate it as you please:
const iframe1 = document.getElementById('iFrame-1');
// Now do what you want with the iFrame
Note, that if you take the status from a flow context var, this var is defined in the server, whereas the iFrame is a client object. You will need to send a message with the desired iFrame statuses to the client
Using flow context you will have to poll that in a flow and send a message to the template. It is generally preferable just to send the message to the template at the time you set the flow context, so you don't need to poll it.