import { p as proxyCustomElement, H, h } from './p-a53686b3.js';
import { F as FormValidationMessageVariation } from './p-7933b555.js';
import { d as defineCustomElement$3 } from './p-2105f731.js';
import { d as defineCustomElement$2 } from './p-d5a3edb9.js';
import { d as defineCustomElement$1 } from './p-fddb6188.js';

const formValidationMessageCss = ".sc-digi-form-validation-message-h{--digi--form-validation-message--icon-color--success:var(--digi--color--icon--validation--success);--digi--form-validation-message--icon-color--warning:var(--digi--color--icon--validation--warning);--digi--form-validation-message--icon-color--error:var(--digi--color--icon--validation--error)}.sc-digi-form-validation-message-h .digi-form-validation-message.sc-digi-form-validation-message{display:flex;flex-wrap:wrap;align-items:center}.sc-digi-form-validation-message-h .digi-form-validation-message--success.sc-digi-form-validation-message{--ICON-COLOR:var(--digi--form-validation-message--icon-color--success)}.sc-digi-form-validation-message-h .digi-form-validation-message--warning.sc-digi-form-validation-message{--ICON-COLOR:var(--digi--form-validation-message--icon-color--warning)}.sc-digi-form-validation-message-h .digi-form-validation-message--error.sc-digi-form-validation-message{--ICON-COLOR:var(--digi--form-validation-message--icon-color--error)}.sc-digi-form-validation-message-h .digi-form-validation-message__icon.sc-digi-form-validation-message{color:var(--ICON-COLOR);margin-inline-end:var(--digi--gutter--icon)}.sc-digi-form-validation-message-h .digi-form-validation-message__icon.sc-digi-form-validation-message>*.sc-digi-form-validation-message{--digi--icon--width:1.25em;--digi--icon--height:1.25em;--digi--icon--color:var(--ICON-COLOR);display:flex}.sc-digi-form-validation-message-h .digi-form-validation-message__icon.sc-digi-form-validation-message .warning.sc-digi-form-validation-message{top:3px;position:relative}.sc-digi-form-validation-message-h .digi-form-validation-message__text.sc-digi-form-validation-message{flex:1;font-family:var(--digi--global--typography--font-family--default);font-size:var(--digi--typography--tag--font-size--desktop);color:var(--digi--color--text--primary)}";
const DigiFormValidationMessageStyle0 = formValidationMessageCss;

const FormValidationMessage = /*@__PURE__*/ proxyCustomElement(class FormValidationMessage extends H {
    constructor() {
        super();
        this.__registerHost();
        this.afVariation = FormValidationMessageVariation.SUCCESS;
    }
    get cssModifiers() {
        return {
            'digi-form-validation-message--success': this.afVariation === FormValidationMessageVariation.SUCCESS,
            'digi-form-validation-message--error': this.afVariation === FormValidationMessageVariation.ERROR,
            'digi-form-validation-message--warning': this.afVariation === FormValidationMessageVariation.WARNING
        };
    }
    get icon() {
        switch (this.afVariation) {
            case FormValidationMessageVariation.SUCCESS:
                return h("digi-icon-validation-success", null);
            case FormValidationMessageVariation.ERROR:
                return h("digi-icon-validation-error", null);
            case FormValidationMessageVariation.WARNING:
                return h("digi-icon-validation-warning", { class: "warning" });
        }
    }
    render() {
        return (h("div", { key: 'b39aa9f7c7e9ec75c7ffd7613953a350129f1689', class: Object.assign({ 'digi-form-validation-message': true }, this.cssModifiers) }, h("div", { key: '2b0507799231c329f600279e9140fc4ab4e09c70', class: "digi-form-validation-message__icon", "aria-hidden": "true" }, this.icon), h("span", { key: '4027b59a97f1ce0fe1d30b12453456ee0a044c06', class: "digi-form-validation-message__text" }, h("slot", { key: 'f115e6f24b60e34eb9b0b6bec5b6cfd2fff639fd' }))));
    }
    get hostElement() { return this; }
    static get style() { return DigiFormValidationMessageStyle0; }
}, [6, "digi-form-validation-message", {
        "afVariation": [1, "af-variation"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["digi-form-validation-message", "digi-icon-validation-error", "digi-icon-validation-success", "digi-icon-validation-warning"];
    components.forEach(tagName => { switch (tagName) {
        case "digi-form-validation-message":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, FormValidationMessage);
            }
            break;
        case "digi-icon-validation-error":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "digi-icon-validation-success":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
        case "digi-icon-validation-warning":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}

export { FormValidationMessage as F, defineCustomElement as d };
