import { $, html } from "sigpro"; const getVal = (props, key, def) => { const v = props[key]; if (v === undefined || v === null) return def; if (typeof v === "function") { try { return v(); } catch { return def; } } return v; }; const toString = (val) => { if (val === undefined || val === null) return ""; return String(val); }; $.component( "c-check", (props, { emit }) => { const label = toString(getVal(props, "label", "")); const disabled = getVal(props, "disabled", false); const isToggle = getVal(props, "toggle", false); return html` `; }, ["label", "checked", "disabled", "toggle"], );