import { Host, h } from "@stencil/core";
export class CpslRadio {
    constructor() {
        this.handleRadioClick = () => {
            if (!this.checked) {
                this.cpslRadioChanged.emit(!this.checked);
            }
        };
        this.checked = undefined;
    }
    render() {
        return (h(Host, { key: 'd16cc95323ff4d04b643beb986081c8ee93d10dd' }, h("input", { key: 'e33dbf1aea7fbf6c17f074162e1b123b5df4f797', type: "radio", checked: this.checked }), h("span", { key: '9ec66324f32c9ef1c2b3d7fba10ed5b9df0e9979', onClick: this.handleRadioClick, class: { container: true, checked: this.checked } })));
    }
    static get is() { return "cpsl-radio"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["cpsl-radio.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["cpsl-radio.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 radio is checked."
                },
                "attribute": "checked",
                "reflect": false
            }
        };
    }
    static get events() {
        return [{
                "method": "cpslRadioChanged",
                "name": "cpslRadioChanged",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": "Emitted when the radio state changes."
                },
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                }
            }];
    }
}
//# sourceMappingURL=cpsl-radio.js.map
