import{r as e,j as s}from"./vendor-react-Dp9pL_Wn.js";import{k as r,C as t}from"./c2ee0272b-DPDuX889.js";const n=e.createContext({isExpanded:!0,setIsExpanded:()=>{},setIsExpandedTransient:()=>{},registerComposerRef:()=>{},focusComposer:()=>{}});function a(){return e.useContext(n)}function o({children:a}){const[o,u]=r(t.CODE_SIDEBAR_PINNED,!0),[c,d]=e.useState(o),i=e.useRef(null),l=e.useCallback(e=>{d(e),u(e)},[u]),p=e.useCallback(e=>{d(e)},[]),C=e.useCallback(e=>{i.current=e},[]),f=e.useCallback(()=>{setTimeout(()=>{i.current?.current?.focus()},50)},[]),m=e.useMemo(()=>({isExpanded:c,setIsExpanded:l,setIsExpandedTransient:p,registerComposerRef:C,focusComposer:f}),[c,l,p,C,f]);return s.jsx(n.Provider,{value:m,children:a})}export{o as C,a as u};
