import { LitElement, html } from "lit"; import { customElement, property } from "lit/decorators.js"; @customElement("setting-toggle") export class SettingToggle extends LitElement { @property() label = "Setting"; @property() description = ""; @property() id = ""; @property({ type: Boolean, reflect: true }) checked = false; @property({ type: Boolean }) easter = false; createRenderRoot() { return this; } private handleChange(e: Event) { const input = e.target as HTMLInputElement; this.checked = input.checked; this.dispatchEvent( new CustomEvent("change", { detail: { checked: this.checked }, bubbles: true, composed: true, }), ); } render() { return html`
${this.description}
`; } }