import { h } from "@stencil/core";
export class GenericToast {
    render() {
        const isComponentToast = 'instantiateToastElement' in this.toast;
        if (isComponentToast) {
            return h("mvx-custom-toast", { toast: this.toast, onDeleteToast: () => this.deleteToast.emit(this.toast.toastId) });
        }
        return h("mvx-simple-toast", { toast: this.toast, onDeleteToast: () => this.deleteToast.emit(this.toast.toastId) });
    }
    static get is() { return "mvx-generic-toast"; }
    static get properties() {
        return {
            "toast": {
                "type": "unknown",
                "attribute": "toast",
                "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": "deleteToast",
                "name": "deleteToast",
                "bubbles": true,
                "cancelable": true,
                "composed": true,
                "docs": {
                    "tags": [],
                    "text": ""
                },
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                }
            }];
    }
}
//# sourceMappingURL=generic-toast.js.map
