import { h } from "@stencil/core";
export class Label {
    constructor() {
        /**
         * If true, indicate the field is optional
         */
        this.optional = false;
    }
    componentDidLoad() {
        this.anjLabelDidLoad.emit();
    }
    render() {
        return (h("label", { id: this.labelId, htmlFor: this.for },
            h("slot", null),
            this.optional ? h("div", { class: "anj-optional" }, "Optional") : undefined));
    }
    static get is() { return "anj-label"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() { return {
        "$": ["label.scss"]
    }; }
    static get styleUrls() { return {
        "$": ["label.css"]
    }; }
    static get properties() { return {
        "for": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Mirrors native \"for\" attribute"
            },
            "attribute": "for",
            "reflect": false
        },
        "labelId": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "The id for the native label"
            },
            "attribute": "label-id",
            "reflect": false
        },
        "optional": {
            "type": "boolean",
            "mutable": false,
            "complexType": {
                "original": "boolean",
                "resolved": "boolean",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "If true, indicate the field is optional"
            },
            "attribute": "optional",
            "reflect": true,
            "defaultValue": "false"
        }
    }; }
    static get events() { return [{
            "method": "anjLabelDidLoad",
            "name": "anjLabelDidLoad",
            "bubbles": true,
            "cancelable": true,
            "composed": true,
            "docs": {
                "tags": [],
                "text": "Emitted when the input has been loaded."
            },
            "complexType": {
                "original": "void",
                "resolved": "void",
                "references": {}
            }
        }]; }
}
