import{ac as m,h as _,U as b,E as v,aP as E,bw as S,k as B,v as I,o as D,g as t,w as O,a as h,ad as w,N as x,x as A,bx as y}from"./BzhixHsn.js";import{T as C}from"./CCA1r4XF.js";const l="sidebar_state",M=3600*24*7,R="16rem",N="18rem",g="3rem",k="b",[P,T]=m("Sidebar"),V=_({__name:"SidebarProvider",props:{defaultOpen:{type:Boolean,default:!y?.cookie.includes(`${l}=false`)},open:{type:Boolean,default:void 0},class:{}},emits:["update:open"],setup(u,{emit:c}){const s=u,p=c,n=b("(max-width: 768px)"),o=v(!1),a=E(s,"open",p,{defaultValue:s.defaultOpen??!1,passive:s.open===void 0});function r(e){a.value=e,document.cookie=`${l}=${a.value}; path=/; max-age=${M}`}function i(e){o.value=e}function d(){return n.value?i(!o.value):r(!a.value)}S("keydown",e=>{e.key===k&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())});const f=B(()=>a.value?"expanded":"collapsed");return T({state:f,open:a,setOpen:r,isMobile:n,openMobile:o,setOpenMobile:i,toggleSidebar:d}),(e,$)=>(D(),I(t(C),{"delay-duration":0},{default:O(()=>[h("div",w({"data-slot":"sidebar-wrapper",style:{"--sidebar-width":t(R),"--sidebar-width-icon":t(g)},class:t(x)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s.class)},e.$attrs),[A(e.$slots,"default")],16)]),_:3}))}});export{N as S,V as _,P as u};
