const p1TerminalId = "58eb6a95-3953-bffe-86e2-2c7e2e9b99ca";
const p2TerminalId = "74e51029-88a2-2e6a-47f8-4f3ad5f6afaf";
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 {