import{o as r}from"./rolldown-runtime-iuO8RvI4.js";import{Mi as a}from"./vendor-frame-CwiylG4Y.js";import{Ea as o,Oa as s,Ra as e}from"./shared-1-3-6x7RKF.js";var t=r(a());function n(){const r=e(r=>r.section),a=e(r=>r.subpath),n=e(r=>r.setSubpath),u=(0,t.useRef)(void 0);null!==r&&(u.current=a);const l=null===r?u.current:a;return{frames:(0,t.useMemo)(()=>o(l),[l]),drillInto:(0,t.useCallback)((...r)=>n(s(r)),[n]),goBack:(0,t.useCallback)(()=>n(void 0),[n])}}export{n as t};