viewof toggleMachine = {
inspector;
const machine = xstate.createMachine(toggleMachineConfig);
const input = Inputs.input();
const service = xstate
.interpret(machine, { devTools: true })
.onTransition((state) => {
input.value = state;
input.dispatchEvent(new Event("input"), { bubbles: true });
})
.start();
yield Object.assign(input, { service });
}