import{a}from"./vendor-query-B2UbickB.js";const c="lt-collapsed-sections";function i(e){try{const l=localStorage.getItem(`${c}:${e}`);return l?new Set(JSON.parse(l)):new Set}catch{return new Set}}function r(e,l){localStorage.setItem(`${c}:${e}`,JSON.stringify([...l]))}function C(e){const[l,o]=a.useState(()=>i(e)),u=a.useCallback(s=>l.has(s),[l]),d=a.useCallback(s=>{o(n=>{const t=new Set(n);return t.has(s)?t.delete(s):t.add(s),r(e,t),t})},[e]),S=a.useCallback(s=>{o(n=>{if(n.has(s))return n;const t=new Set(n);return t.add(s),r(e,t),t})},[e]),f=a.useCallback(s=>{o(n=>{if(!n.has(s))return n;const t=new Set(n);return t.delete(s),r(e,t),t})},[e]);return{isCollapsed:u,toggle:d,collapse:S,expand:f}}export{C as u};
//# sourceMappingURL=useCollapsedSections-BU5HULGs.js.map
