import{I as e,W as t,h as n,lt as r}from"./vscode-api-DjORcpSo.js";r();var i=t(n,()=>({modals:[],nextKey:1}));function a(){return e(i)}function o(e,t,n){e.set(i,e=>{let r=e.modals.find(e=>l(e.ModalComponent,t)),i={key:r?.key??e.nextKey,ModalComponent:t,props:n};return r?{...e,modals:[...e.modals.filter(e=>!l(e.ModalComponent,t)),i]}:{modals:[...e.modals,i],nextKey:e.nextKey+1}})}function s(e,t){e.set(i,e=>{let n=e.modals.filter(e=>!l(e.ModalComponent,t));return n.length===e.modals.length?e:{...e,modals:n}})}function c(e,t){return e.get(i).modals.some(e=>l(e.ModalComponent,t))}function l(e,t){return e===t}export{a as i,c as n,o as r,s as t};
//# sourceMappingURL=modal-controller-state-pkzvzyfU.js.map