import { Host, h } from "@stencil/core";
export class CpslCheckbox {
    constructor() {
        this.handleCheckboxClick = () => {
            this.cpslCheckboxChanged.emit(!this.checked);
        };
        this.checked = undefined;
    }
    render() {
        return (h(Host, { key: '48249b9fb66fd8acff7fb444f39f1b6b86243b81' }, h("input", { key: 'adfca3d8961b8c5ca7d3b3616101772607cb4ee4', type: "checkbox", checked: this.checked }), h("span", { key: '0f4004593d47c1b6d36215eda48959770e99252e', onClick: this.handleCheckboxClick, class: { container: true, checked: this.checked } }, h("cpsl-icon", { key: '31395afa9b4b9cdcbe74fbccd9ec9abd2f03e441', icon: "check" }))));
    }
    static get is() { return "cpsl-checkbox"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["cpsl-checkbox.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["cpsl-checkbox.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 checkbox is checked."
                },
                "attribute": "checked",
                "reflect": false
            }
        };
    }
    static get events() {
        return [{
                "method": "cpslCheckboxChanged",
                "name": "cpslCheckboxChanged",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emitted when the checkbox state changes."
                },
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                }
            }];
    }
}
//# sourceMappingURL=cpsl-checkbox.js.map
