const p1TerminalId = "8a3f28f5-fe45-4daf-b5cb-3a295b8507ca";
const p2TerminalId = "9dd77cc9-58db-45bf-9069-75bcbefc6f8b";
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 {