import { Host, h } from "@stencil/core";
import { onComponentRequiredPropUndefined } from "../../utils/helpers";
export class StatusTag {
    constructor() {
        /**
         * If `true`, role='status' is added to the component and it will act as an 'aria-live' region.
         * Screen readers will announce changes to the `label`, but not the initial value.
         */
        this.announced = false;
        /**
         * The size of the status tag component.
         */
        this.size = "medium";
        /**
         * The colour of the status tag.
         */
        this.status = "neutral";
        /**
         * Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
         */
        this.theme = "inherit";
        /**
         * The letter case of the status tag's label.
         */
        this.uppercase = true;
        /**
         * The emphasis of the status tag.
         */
        this.variant = "filled";
    }
    componentDidLoad() {
        onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Status Tag");
    }
    render() {
        const { label, status, variant, size, announced, theme, uppercase } = this;
        return (h(Host, { key: 'e6dae50277c14c03b3d42bc12b880fa421ba5e5b', class: { [`ic-theme-${theme}`]: theme !== "inherit" }, role: announced ? "status" : null, "aria-label": "Status" }, h("strong", { key: 'e92f10182a350fd9ea993bb6376b77463a865c6d', class: {
                ["tag"]: true,
                [`${variant}-${status}`]: true,
                ["outlined"]: variant === "outlined",
                [`${size}`]: true,
            } }, h("ic-typography", { key: 'b3a5f6504550096511aa0b0e577be5ed46b9fd84', variant: uppercase ? "label-uppercase" : "label", "apply-vertical-margins": false }, h("span", { key: 'd7cdc4dc4b3e635432d57799cbaea26d5380fea9' }, label)))));
    }
    static get is() { return "ic-status-tag"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["ic-status-tag.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["ic-status-tag.css"]
        };
    }
    static get properties() {
        return {
            "announced": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean | undefined",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "If `true`, role='status' is added to the component and it will act as an 'aria-live' region.\nScreen readers will announce changes to the `label`, but not the initial value."
                },
                "getter": false,
                "setter": false,
                "attribute": "announced",
                "reflect": false,
                "defaultValue": "false"
            },
            "label": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": true,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The content rendered within the status tag."
                },
                "getter": false,
                "setter": false,
                "attribute": "label",
                "reflect": false
            },
            "size": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IcSizes",
                    "resolved": "\"large\" | \"medium\" | \"small\" | undefined",
                    "references": {
                        "IcSizes": {
                            "location": "import",
                            "path": "../../utils/types",
                            "id": "src/utils/types.ts::IcSizes"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "The size of the status tag component."
                },
                "getter": false,
                "setter": false,
                "attribute": "size",
                "reflect": false,
                "defaultValue": "\"medium\""
            },
            "status": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IcStatusTagStatuses",
                    "resolved": "\"danger\" | \"neutral\" | \"success\" | \"warning\" | undefined",
                    "references": {
                        "IcStatusTagStatuses": {
                            "location": "import",
                            "path": "./ic-status-tag.types",
                            "id": "src/components/ic-status-tag/ic-status-tag.types.ts::IcStatusTagStatuses"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "The colour of the status tag."
                },
                "getter": false,
                "setter": false,
                "attribute": "status",
                "reflect": false,
                "defaultValue": "\"neutral\""
            },
            "theme": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "\"dark\" | \"light\" | \"inherit\"",
                    "resolved": "\"dark\" | \"inherit\" | \"light\" | undefined",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component."
                },
                "getter": false,
                "setter": false,
                "attribute": "theme",
                "reflect": false,
                "defaultValue": "\"inherit\""
            },
            "uppercase": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean | undefined",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "The letter case of the status tag's label."
                },
                "getter": false,
                "setter": false,
                "attribute": "uppercase",
                "reflect": false,
                "defaultValue": "true"
            },
            "variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "IcEmphasisType",
                    "resolved": "\"filled\" | \"outlined\" | undefined",
                    "references": {
                        "IcEmphasisType": {
                            "location": "import",
                            "path": "../../utils/types",
                            "id": "src/utils/types.ts::IcEmphasisType"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "The emphasis of the status tag."
                },
                "getter": false,
                "setter": false,
                "attribute": "variant",
                "reflect": false,
                "defaultValue": "\"filled\""
            }
        };
    }
}
//# sourceMappingURL=ic-status-tag.js.map
