import { h, Host } from "@stencil/core";
/**
 * Displays a radio button. Note that this is different from the `verdocs-field-radio-button` component, which is
 * designed to be used in signing experiences and contains settings that connect to template fields. This is just a
 * simple radio button for UI displays e.g. dialog boxes.
 *
 * This control encapsulates a standard HTML radio button. To subscribe to change events, connect an `onChange`
 * handler. Sample usage:
 *
 * ```ts
 * <verdocs-radio-button
 *    value="val1"
 *    name="someProperty"
 *    checked={this.someProperty === 'val1'}
 *    onInput={(e: any) => { this.someProperty = 'val1' }}
 *    disabled={false}
 * />
 * ```
 */
export class VerdocsRadioButton {
    constructor() {
        /**
         * Whether the radio button is currently selected.
         */
        this.checked = false;
        /**
         * HTML form field name for the input.
         */
        this.name = '';
        /**
         * Value to track with the input.
         */
        this.value = '';
        /**
         * If set, the button will still be displayed but not selectable.
         */
        this.disabled = false;
    }
    render() {
        return (h(Host, { key: '5b18b354b3f366588b927e86bc50c78823b0170a', class: { disabled: this.disabled } }, h("input", { key: '4ce54812b031e4c4834c120e1590182603a6c048', type: "radio", value: this.value, name: this.name, id: `verdocs-radio-button-${this.name}-${this.value}`, checked: this.checked, disabled: this.disabled }), h("label", { key: '01a9bc0b36ae4f7a6d3d9c5a6bc53b9c41881bc3', htmlFor: `verdocs-radio-button-${this.name}-${this.value}` })));
    }
    static get is() { return "verdocs-radio-button"; }
    static get originalStyleUrls() {
        return {
            "$": ["verdocs-radio-button.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["verdocs-radio-button.css"]
        };
    }
    static get properties() {
        return {
            "checked": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Whether the radio button is currently selected."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "checked",
                "defaultValue": "false"
            },
            "name": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "HTML form field name for the input."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "name",
                "defaultValue": "''"
            },
            "value": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Value to track with the input."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "value",
                "defaultValue": "''"
            },
            "disabled": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "If set, the button will still be displayed but not selectable."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "disabled",
                "defaultValue": "false"
            }
        };
    }
}
//# sourceMappingURL=verdocs-radio-button.js.map
