import PNotify from"./PNotify.js";let _open=PNotify.prototype.open,_close=PNotify.prototype.close;const callbacks=(t,e,s)=>{let i=t?t.get().modules:e.modules,o=i&&i.Callbacks?i.Callbacks:{};return o[s]?o[s]:()=>!0};function setup(t){t.key="Callbacks",t.getCallbacks=callbacks;let e=PNotify.alert,s=PNotify.notice,i=PNotify.info,o=PNotify.success,n=PNotify.error,a=(t,e)=>{callbacks(null,e,"beforeInit")(e);let s=t(e);return callbacks(s,null,"afterInit")(s),s};PNotify.alert=(t=>a(e,t)),PNotify.notice=(t=>a(s,t)),PNotify.info=(t=>a(i,t)),PNotify.success=(t=>a(o,t)),PNotify.error=(t=>a(n,t)),PNotify.modules.Callbacks=t}function create_main_fragment(t,e){return{c:noop,m:noop,p:noop,d:noop}}function PNotifyCallbacks(t){init(this,t),this._state=assign({},t.data),this._intro=!0,this._fragment=create_main_fragment(this,this._state),t.target&&(this._fragment.c(),this._mount(t.target,t.anchor))}function noop(){}function init(t,e){t._handlers=blankObject(),t._slots=blankObject(),t._bind=e._bind,t._staged={},t.options=e,t.root=e.root||t,t.store=e.store||t.root.store,e.root||(t._beforecreate=[],t._oncreate=[],t._aftercreate=[])}function assign(t,e){for(var s in e)t[s]=e[s];return t}function destroy(t){this.destroy=noop,this.fire("destroy"),this.set=noop,this._fragment.d(!1!==t),this._fragment=null,this._state={}}function get(){return this._state}function fire(t,e){var s=t in this._handlers&&this._handlers[t].slice();if(s)for(var i=0;i