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: '54a918e6ce51bf58f0a7c5192a98daf7fc9ebbc3' }, h("input", { key: 'f17dfaa5870c52b2a4bbb9dcb12ebe413f11639b', type: "checkbox", checked: this.checked }), h("span", { key: '87225d9d683d3617c130632bbf5b7353f1fb8a3c', onClick: this.handleSwitchClick, class: { container: true, checked: this.checked } }, h("span", { key: '71b879d14a5100a7469e5403d6cd3ec0beae9a9f', 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
