import { Host, h } from "@stencil/core";
/**
 * Display a combo box. This is just a standard HTML select field with minimal markup to fit the
 * visual styles of the other components. Note that events "bubble" from the input field to the container,
 * so you can subscribe to the same DOM events (input, blur, etc) that a normal input would emit.
 *
 * ```ts
 * <verdocs-select-input label="Select:" label="Select" options={[...options]} onInput={() => {}} />
 * ```
 */
export class VerdocsSelectInput {
    constructor() {
        /**
         * The initial value for the input field.
         */
        this.value = '';
        /**
         * The label for the field.
         */
        this.label = '';
        /**
         * Should the field be disabled?
         */
        this.disabled = false;
    }
    render() {
        return (h(Host, { key: 'c46f6b1366be359d88978c5972f25fd6c789af9b', class: "input-field" }, h("label", { key: '47408c05e2086310598ccbee67c90480f0e81059' }, this.label ? h("div", { class: "input-label" }, this.label + ':') : h("div", null), h("select", { key: '365a09cc6540276b90d51940b5ee1be042d9c563', class: "input-element", disabled: this.disabled }, this.options.map(option => (h("option", { value: option.value, selected: option.value === this.value }, option.label)))))));
    }
    static get is() { return "verdocs-select-input"; }
    static get originalStyleUrls() {
        return {
            "$": ["verdocs-select-input.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["verdocs-select-input.css"]
        };
    }
    static get properties() {
        return {
            "value": {
                "type": "string",
                "attribute": "value",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The initial value for the input field."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "''"
            },
            "label": {
                "type": "string",
                "attribute": "label",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The label for the field."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "''"
            },
            "options": {
                "type": "unknown",
                "attribute": "options",
                "mutable": false,
                "complexType": {
                    "original": "{label: string; value: string}[]",
                    "resolved": "{ label: string; value: string; }[]",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The options to list."
                },
                "getter": false,
                "setter": false
            },
            "disabled": {
                "type": "boolean",
                "attribute": "disabled",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Should the field be disabled?"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "false"
            }
        };
    }
}
//# sourceMappingURL=verdocs-select-input.js.map
