import { h, Host } from "@stencil/core";
import { validateProp } from "../../helpers/Validate/props";
import { MessageClass } from "./constants";
import { govHost } from "../../helpers/Dom/template";
import { Colors } from "../../core/constants/colors";
export class GovMessage {
    constructor() {
        /**
         * Style variation of the content message.
         */
        this.color = Colors.PRIMARY;
        /**
         * Message type
         */
        this.type = "subtle";
        this.h = govHost(this.host);
    }
    validateColor(newValue) {
        validateProp(Colors, newValue, MessageClass.root);
    }
    render() {
        return (h(Host, { key: '646b418ce94ae2c4a0e68ae7662b6a0cdcb5abdf', class: this.h.classes(MessageClass.root), color: this.color, type: this.type, role: "status" }, this.h.hasSlot("icon") && (h("span", { key: 'c628baa7a9302fd2422418f6cb643ab188630d19' }, h("slot", { key: '3e06254836e945da56d642ca358730c59da0575d', name: "icon" }))), h("div", { key: 'e9732388652c00c5bb4292d61ba71a62b3a6ca07', class: MessageClass.content }, h("slot", { key: '71b74db9ecbfa2fcd0bbb102e6d77accbcd1d3f0' }))));
    }
    static get is() { return "gov-message"; }
    static get properties() {
        return {
            "color": {
                "type": "string",
                "attribute": "color",
                "mutable": false,
                "complexType": {
                    "original": "MessageColorType",
                    "resolved": "\"error\" | \"neutral\" | \"primary\" | \"success\" | \"warning\"",
                    "references": {
                        "MessageColorType": {
                            "location": "import",
                            "path": "./constants",
                            "id": "../../../packages/core/src/components/gov-message/constants.ts::MessageColorType"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Style variation of the content message."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "Colors.PRIMARY"
            },
            "type": {
                "type": "string",
                "attribute": "type",
                "mutable": false,
                "complexType": {
                    "original": "MessageTypesType",
                    "resolved": "\"bold\" | \"subtle\"",
                    "references": {
                        "MessageTypesType": {
                            "location": "import",
                            "path": "./constants",
                            "id": "../../../packages/core/src/components/gov-message/constants.ts::MessageTypesType"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Message type"
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "\"subtle\""
            }
        };
    }
    static get elementRef() { return "host"; }
    static get watchers() {
        return [{
                "propName": "color",
                "methodName": "validateColor"
            }];
    }
}
//# sourceMappingURL=gov-message.js.map
