import{a2 as o}from"./app-B4kV47qU.js";const n=o({position:"position-top-right",items:[],set({type:e,message:s},t){this.position||(this.position="position-top-right"),t&&(this.position=t),this.items.unshift({key:Symbol(),type:e,message:s})},setSessionToast(e){if(sessionStorage.getItem("backNavigation")){sessionStorage.removeItem("backNavigation");return}if(e&&Object.keys(e).length>0)for(const[s,t]of Object.entries({...e}))Array.isArray(t)?t.forEach(i=>setTimeout(()=>this.set({type:s,message:i})),0):setTimeout(()=>this.set({type:s,message:t}),0)},success(e,s){this.set({type:"success",message:e},s)},danger(e,s){this.set({type:"danger",message:e},s)},warning(e,s){this.set({type:"warning",message:e},s)},info(e,s){this.set({type:"info",message:e},s)},remove(e){this.items.splice(e,1)}});window.addEventListener("popstate",()=>{sessionStorage.setItem("backNavigation","true")});export{n as t};
