import { Host, h } from "@stencil/core";
import { isNestedInIfxComponent } from "../..//shared/utils/dom-utils";
import { detectFramework } from "../..//shared/utils/framework-detection";
import { trackComponent } from "../../shared/utils/tracking";
export class Notification {
    el;
    icon;
    variant = "success";
    linkText;
    linkHref;
    linkTarget = "_blank";
    async componentDidLoad() {
        if (!isNestedInIfxComponent(this.el)) {
            const framework = detectFramework();
            trackComponent("ifx-notification", await framework);
        }
    }
    getClassName() {
        switch (this.variant) {
            case "success":
                return "ifx-notification__wrapper--success";
            case "locked":
                return "ifx-notification__wrapper--locked";
            case "error":
                return "ifx-notification__wrapper--error";
            case "neutral":
                return "ifx-notification__wrapper--neutral";
            default:
                return "ifx-notification__wrapper--success";
        }
    }
    render() {
        return (h(Host, { key: '7c24532c4c13e94890beef7559e1b59e1051ec3c' }, h("div", { key: '959139f99bf476ee606595e82e475781a50b4097', class: "ifx-notification__wrapper " + this.getClassName() }, h("div", { key: '1c064798ba1eee6e55f55fdfcbe48f6a935f87e6', class: "ifx-notification__icon" }, h("ifx-icon", { key: '4b0b6d4dca80ca2809110580a6ef106750bc7d24', icon: this.icon })), h("div", { key: '23176c7deb31459a8b64d408659e23fef8a27bb8', class: "ifx-notification__body" }, h("div", { key: '37563292f93d01d885f85e75c704d0ce4ee45ed9', class: "ifx-notification__slot" }, h("slot", { key: '44f3a2a5baa187bc0cf9aa60768bbff2ddeac9a3' })), this.linkText && this.linkHref && (h("div", { key: '9b26058a528029fc4f0f0d88c7d29bb1c668658c', class: "ifx-notification__link" }, h("ifx-link", { key: 'c58948a40aa54007e141a7e329055d09afff64dd', href: this.linkHref, target: this.linkTarget }, this.linkText, h("ifx-icon", { key: '4943a933ac201582ba54665061a60a5f2e72b4a7', icon: "arrow-right-16" }))))))));
    }
    static get is() { return "ifx-notification"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["notification.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["notification.css"]
        };
    }
    static get properties() {
        return {
            "icon": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "icon"
            },
            "variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "NotificationVariant",
                    "resolved": "\"error\" | \"locked\" | \"neutral\" | \"success\"",
                    "references": {
                        "NotificationVariant": {
                            "location": "local",
                            "path": "/home/runner/work/infineon-design-system-stencil/infineon-design-system-stencil/packages/components/src/components/notification/notification.tsx",
                            "id": "src/components/notification/notification.tsx::NotificationVariant"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "variant",
                "defaultValue": "\"success\""
            },
            "linkText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "link-text"
            },
            "linkHref": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "link-href"
            },
            "linkTarget": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "link-target",
                "defaultValue": "\"_blank\""
            }
        };
    }
    static get elementRef() { return "el"; }
}
//# sourceMappingURL=notification.js.map
