import{c as a}from"./index.BHh4vvK5.js";import{a as r}from"./index.3whys8t3.js";const t=r({type:null}),f=a(t,e=>e.type==="drawer"),p=a(t,e=>e.type==="search"),m=a(t,e=>e.type==="codeFullscreen"?e.data:null),y=a(t,e=>e.type==="diagramFullscreen"?e.data:null),h=a(t,e=>e.type==="imageLightbox"?e.data:null),w=a(t,e=>e.type!==null);function d(e,n){t.set({type:e,data:n}),e&&typeof document<"u"&&(document.body.style.overflow="hidden")}function c(){typeof document<"u"&&(document.body.style.overflow=""),t.set({type:null})}function i(e){t.get().type===e?c():d(e)}const x=()=>c(),$=()=>i("drawer");function b(e){const n=t.get();if(n.type!=="imageLightbox")return!1;const o=n.data,s=o.currentIndex+e;if(s<0||s>=o.images.length)return!1;const l=o.images[s];return t.set({type:"imageLightbox",data:{...o,src:l.src,alt:l.alt,currentIndex:s}}),!0}export{m as $,y as a,h as b,c,f as d,w as e,x as f,p as g,b as n,d as o,$ as t};
