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: '25dcdde1d8837e343002fb1ead236752099bef7a', class: { disabled: this.disabled } }, h("input", { key: '612b43c1693b5c50a56d8ec54d598a11822a6f82', 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: '568e105e85565a22c766a823323d333202cc4386', 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",
                "attribute": "checked",
                "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,
                "defaultValue": "false"
            },
            "name": {
                "type": "string",
                "attribute": "name",
                "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,
                "defaultValue": "''"
            },
            "value": {
                "type": "string",
                "attribute": "value",
                "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,
                "defaultValue": "''"
            },
            "disabled": {
                "type": "boolean",
                "attribute": "disabled",
                "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,
                "defaultValue": "false"
            }
        };
    }
}
//# sourceMappingURL=verdocs-radio-button.js.map
