import { h, Host } from "@stencil/core";
import { trackComponent } from "../../global/utils/tracking";
import { isNestedInIfxComponent } from "../../global/utils/dom-utils";
import { detectFramework } from "../../global/utils/framework-detection";
export class Notification {
    constructor() {
        this.variant = 'success';
        this.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: '7bbeaae1a7a9d3717f5aca378041e232d8a60fa3' }, h("div", { key: '06cb1830b2d084e3f3908a1a3e507c429bcec8ec', class: "ifx-notification__wrapper " + this.getClassName() }, h("div", { key: '93dfa7a2463fd2e689b549d05455d771725eaecf', class: "ifx-notification__icon" }, h("ifx-icon", { key: '07d73ca0368cf493cb01d6df1f30374df9663abb', icon: this.icon })), h("div", { key: '9da8c205def2615bb2e3da50c03acce2c3c49712', class: "ifx-notification__body" }, h("div", { key: '22cd9dfabc23b685d983f403e3649d247e97b7fc', class: "ifx-notification__slot" }, h("slot", { key: '1feecd971094e46f36572c1005dacfa943b005f4' })), this.linkText && this.linkHref &&
            h("div", { key: '2779a104d2b7a0d13114a90b7346c4ef5554704c', class: "ifx-notification__link" }, h("ifx-link", { key: '293725867cdeb88f4fa16efbcf812e58ddc9ab4b', href: this.linkHref, target: this.linkTarget }, this.linkText, h("ifx-icon", { key: 'aca1eae60ca7b17536ad673d9dc236f5bdd456a8', 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",
                "attribute": "icon",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "variant": {
                "type": "string",
                "attribute": "variant",
                "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,
                "defaultValue": "'success'"
            },
            "linkText": {
                "type": "string",
                "attribute": "link-text",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "linkHref": {
                "type": "string",
                "attribute": "link-href",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false
            },
            "linkTarget": {
                "type": "string",
                "attribute": "link-target",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "defaultValue": "'_blank'"
            }
        };
    }
    static get elementRef() { return "el"; }
}
//# sourceMappingURL=notification.js.map
