import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{ki as t}from"./lucide-icons-BjbcRgLk.js";var n=e(t(),1),r=[`showFAB`,`fabKind`,`fabHref`,`onFabClick`,`fabIcon`,`wrapperClassName`,`rightSidebar`,`scrollContainer`,`noOverscroll`,`noMaxWidth`,`hasSubHeader`,`noArcs`,`hideTopBar`,`hideBottomNav`];function i(e,t){if(e===null)return!1;if(e===t)return!0;for(let n of r)if(e[n]!==t[n])return!1;return!0}var a={},o=class{options=a;listeners=new Set;getSnapshot=()=>this.options;subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));setOptions=e=>{this.options!==e&&(this.options=e,this.listeners.forEach(e=>e()))};reset=()=>{this.options!==a&&(this.options=a,this.listeners.forEach(e=>e()))}},s=(0,n.createContext)(null),c=(0,n.createContext)(null);function l(){return(0,n.useContext)(c)}var u=(0,n.createContext)(!1);function d(){return(0,n.useContext)(u)}var f=(0,n.createContext)(()=>{});function p(){return(0,n.useContext)(f)}function m(){let e=(0,n.useContext)(s);if(!e)throw Error(`useLayoutOptions must be used within LayoutStoreContext`);return e}function h(e){let t=m(),r=(0,n.useRef)(null);(0,n.useLayoutEffect)(()=>{i(r.current,e)||(r.current=e,t.setOptions(e))}),(0,n.useEffect)(()=>()=>{let e=r.current;requestAnimationFrame(()=>{t.getSnapshot()===e&&t.reset()})},[t])}function g(){let e=m();return(0,n.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}export{u as a,g as c,s as i,d as l,f as n,l as o,o as r,h as s,c as t,p as u};