import { Host, h } from "@stencil/core";
export class CpslSwitch {
    constructor() {
        this.handleSwitchClick = () => {
            this.cpslSwitchChanged.emit(!this.checked);
        };
        this.checked = undefined;
    }
    render() {
        return (h(Host, { key: '80395b6f36c5653c725a69883098d2822cb6d420' }, h("input", { key: 'b9f74ffce1f02b8efa28b47f60c82e549a87bd09', type: "checkbox", checked: this.checked }), h("span", { key: '1f0763f6aaca5f55a66620a59444a907dc837360', onClick: this.handleSwitchClick, class: { container: true, checked: this.checked } }, h("span", { key: '1804cbae3ea10091952722c6bfb50c6dd518fe0b', class: { thumb: true, checked: this.checked } }))));
    }
    static get is() { return "cpsl-switch"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["cpsl-switch.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["cpsl-switch.css"]
        };
    }
    static get properties() {
        return {
            "checked": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Whether or not the switch is checked."
                },
                "attribute": "checked",
                "reflect": false
            }
        };
    }
    static get events() {
        return [{
                "method": "cpslSwitchChanged",
                "name": "cpslSwitchChanged",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emitted when the switch state changes."
                },
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                }
            }];
    }
}
//# sourceMappingURL=cpsl-switch.js.map
