import*as t from"react";import{render as e}from"react-dom";import{ToastManager as i}from"./toast-manager.js";import{isBrowser as o}from"../../../utils/dist/esm/dom.js";function s(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var a=new class{constructor(){var a=this;if(s(this,"createToast",void 0),s(this,"removeAll",void 0),s(this,"closeToast",void 0),s(this,"updateToast",void 0),s(this,"isToastActive",void 0),s(this,"bindFunctions",(t=>{this.createToast=t.notify,this.removeAll=t.closeAll,this.closeToast=t.close,this.updateToast=t.update,this.isToastActive=t.isActive})),s(this,"notify",(function(t,e){return void 0===e&&(e={}),null==a.createToast?void 0:a.createToast(t,e)})),s(this,"close",(t=>{var e;null==(e=this.closeToast)||e.call(this,t)})),s(this,"closeAll",(t=>{var e;null==(e=this.removeAll)||e.call(this,t)})),s(this,"update",(function(t,e){void 0===e&&(e={}),null==a.updateToast||a.updateToast(t,e)})),s(this,"isActive",(t=>{var e;return null==(e=this.isToastActive)?void 0:e.call(this,t)})),o){var l,r=document.getElementById("chakra-toast-portal");if(r)l=r;else{var c,n=document.createElement("div");n.id="chakra-toast-portal",null==(c=document.body)||c.appendChild(n),l=n}e(t.createElement(i,{notify:this.bindFunctions}),l)}}};export{a as toast};
//# sourceMappingURL=toast.class.js.map
