import { h, Host } from "@stencil/core";
import { BEM } from "../../utils/bem";
export class InputGroup {
    constructor() {
        /**
         * If `true` the component gets a invalid style.
         */
        this.invalid = false;
        /**
         * If `true`, the element is not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor its form control descendants.
         */
        this.disabled = false;
        /**
         * If `true` the element can not mutated, meaning the user can not edit the control.
         */
        this.readonly = false;
    }
    render() {
        const block = BEM.block('input-group');
        const dangerClass = 'is-danger';
        const hasDanger = this.invalid;
        const disabledClass = 'is-disabled';
        const hasDisabled = this.disabled || this.readonly;
        return (h(Host, { key: '9195a63ef1f2aaa0137b474c18933e80a43e0627', class: Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier(dangerClass).class(hasDanger)), block.modifier(disabledClass).class(hasDisabled)) }, h("slot", { key: 'fe954e0a0cca1ea081567c6ccac571e9107d8d2e' })));
    }
    static get is() { return "bal-input-group"; }
    static get originalStyleUrls() {
        return {
            "$": ["bal-input-group.sass"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bal-input-group.css"]
        };
    }
    static get properties() {
        return {
            "invalid": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "If `true` the component gets a invalid style."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "invalid",
                "defaultValue": "false"
            },
            "disabled": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "If `true`, the element is not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor its form control descendants."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "disabled",
                "defaultValue": "false"
            },
            "readonly": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "If `true` the element can not mutated, meaning the user can not edit the control."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "readonly",
                "defaultValue": "false"
            }
        };
    }
    static get elementRef() { return "el"; }
}
