import { h } from "@stencil/core";
export class GenericToast {
    render() {
        const isComponentToast = 'instantiateToastElement' in this.toast;
        if (isComponentToast) {
            return h("custom-toast", { toast: this.toast, onHandleDeleteToast: () => this.handleDeleteToast.emit(this.toast.toastId) });
        }
        return h("simple-toast", { toast: this.toast, onHandleDeleteToast: () => this.handleDeleteToast.emit(this.toast.toastId) });
    }
    static get is() { return "generic-toast"; }
    static get properties() {
        return {
            "toast": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "CustomToastType",
                    "resolved": "IComponentToast | ISimpleToast",
                    "references": {
                        "CustomToastType": {
                            "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::CustomToastType"
                        }
                    }
                },
                "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=generic-toast.js.map
