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: 'a0440f0feb4b7a67517d1d8278e9bcbb2c7ef764' }, h("input", { key: '54dc5c3e64777504d5c851940d785a90de2d2882', type: "radio", checked: this.checked }), h("span", { key: 'dc5d326b957993e0a14ae6827751e946e141d3e6', 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
