const p1TerminalId = "9bda98af-5d5b-f366-b01d-91b6f6a3cd65";
const p2TerminalId = "c2b4734b-a628-262f-9275-fb35dc60ebf7";
const p1Terminal = flux.getNodeById(p1TerminalId, "elementTerminal");
const p2Terminal = flux.getNodeById(p2TerminalId, "elementTerminal");
const mySwitch = flux.controls.find(control => control.name === "Switch State");
if (mySwitch?.value) {
flux.currentSymbol = "closed";
flux.simulationModel = simModel(true);
} else {
flux.currentSymbol = "open";
flux.simulationModel = simModel(false);
}
flux.on("inputChange", (e: InputControlChangeEvent) => {
if (e.control_name === "Switch State") {
if (e.value) {
flux.currentSymbol = "closed";
flux.simulationModel = simModel(true);
} else {