import { faTimes } from "@fortawesome/free-solid-svg-icons";
import { h } from "@stencil/core";
import { getIconHtmlFromIconDefinition } from "../../../../../../../utils/icons/getIconHtmlFromIconDefinition";
export class CustomToast {
    render() {
        const customToast = (h("div", { key: '9ac697a5ccecd6aacd443c3ed702b14d6a22387f', class: "toast-wrapper" }, h("button", { key: '880d58e94015ac7ec2d38ea412e81ac7521cf513', onClick: () => this.handleDeleteToast.emit(), type: "button", class: "icon-close", innerHTML: getIconHtmlFromIconDefinition(faTimes) }), h("div", { key: '1efd9d7b3cfd05909489fb581fa773cdf2edf522', class: "toast-body", ref: container => this.initializeToast(container) })));
        return customToast;
    }
    initializeToast(container) {
        if (!container || container.hasChildNodes()) {
            return;
        }
        const customElement = this.toast.instantiateToastElement();
        if (!customElement) {
            return;
        }
        container.appendChild(customElement);
    }
    static get is() { return "custom-toast"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["custom-toast.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["custom-toast.css"]
        };
    }
    static get properties() {
        return {
            "toast": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "IComponentToast",
                    "resolved": "IComponentToast",
                    "references": {
                        "IComponentToast": {
                            "location": "import",
                            "path": "components/functional/toasts-list/components/transaction-toast/transaction-toast.type",
                            "id": "src/components/functional/toasts-list/components/transaction-toast/transaction-toast.type.ts::IComponentToast"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "getter": false,
                "setter": false
            }
        };
    }
    static get events() {
        return [{
                "method": "handleDeleteToast",
                "name": "handleDeleteToast",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                }
            }];
    }
}
//# sourceMappingURL=custom-toast.js.map
