import{i as e,n as t}from"./rolldown-runtime-ConPGZeh.js";import{En as n,Nn as r,Pr as i,Qn as a,Sr as o,Tn as s,d as c,f as l,hr as u,ii as d,or as f}from"./vendor-primevue-D1-E3-0M.js";import{fn as p,pn as m}from"./api-DvJuMrZn.js";import{Ja as h,qa as g}from"./dialogService-DIdX_hbW.js";var _,v=t((()=>{r(),c(),s(),g(),p(),_=f({__name:`GlobalToast`,setup(e){let t=n(),r=m(),s=h();i(()=>r.messagesToAdd,e=>{e.length!==0&&(e.forEach(e=>{t.add(e)}),r.messagesToAdd=[])},{deep:!0}),i(()=>r.messagesToRemove,e=>{e.length!==0&&(e.forEach(e=>{t.remove(e)}),r.messagesToRemove=[])},{deep:!0}),i(()=>r.removeAllRequested,e=>{e&&(t.removeAllGroups(),r.removeAllRequested=!1)});function updateToastPosition(){let e=document.getElementById(`dynamic-toast-style`)||createStyleElement(),t=document.querySelector(`.graph-canvas-container`)?.getBoundingClientRect();t&&(e.textContent=`
    .p-toast.p-component.p-toast-top-right {
      top: ${t.top+100}px !important;
      right: ${window.innerWidth-(t.left+t.width)+20}px !important;
       z-index: 10000 !important;
    }
  `)}function createStyleElement(){let e=document.createElement(`style`);return e.id=`dynamic-toast-style`,document.head.appendChild(e),e}return i(()=>s.get(`Comfy.UseNewMenu`),()=>u(updateToastPosition),{immediate:!0}),i(()=>s.get(`Comfy.Sidebar.Location`),()=>u(updateToastPosition),{immediate:!0}),(e,t)=>(o(),a(d(l)))}})})),y,b=t((()=>{v(),v(),y=_}));export{b as n,y as t};
//# sourceMappingURL=GlobalToast-Cf-KUKIU.js.map