import{a as d}from"/build/_shared/chunk-AET2SFA2.js";import{b as c}from"/build/_shared/chunk-3X23XH62.js";import{C as g,F as m,N as p,O as y,P as r,R as h,S as C,c as a,s as b,w as u}from"/build/_shared/chunk-C3GUTQLB.js";import{D as l,t as x,v as f}from"/build/_shared/chunk-UT3CV7CR.js";import{d as s}from"/build/_shared/chunk-G5WX4PPA.js";var e=s(l()),v=[{name:"Actions",icon:"fa6-solid:code",to:"/actions"}];function P({children:o}){let{isOpen:t,onOpen:n,onClose:i}=g();return(0,e.jsxs)(p,{minH:"100vh",bg:a("gray.100","gray.900"),children:[(0,e.jsx)(F,{onClose:()=>i,display:{base:"none",md:"flex"}}),(0,e.jsx)(h,{autoFocus:!1,isOpen:t,placement:"left",onClose:i,returnFocusOnClose:!1,onOverlayClick:i,size:"full",children:(0,e.jsx)(C,{children:(0,e.jsx)(F,{onClose:i})})}),(0,e.jsx)(S,{display:{base:"flex",md:"none"},onOpen:n}),(0,e.jsx)(p,{ml:{base:0,md:48},children:o})]})}var F=({onClose:o,...t})=>(0,e.jsxs)(r,{bg:a("white","gray.900"),borderRight:"1px",flexDirection:"column",borderRightColor:a("gray.200","gray.700"),w:{base:"full",md:48},pos:"fixed",h:"full",py:4,zIndex:2,gap:4,...t,children:[(0,e.jsxs)(r,{alignItems:"center",mx:"8",justifyContent:"space-between",children:[(0,e.jsx)(m,{fontSize:"2xl",fontFamily:"monospace",fontWeight:"bold",children:"Runnable"}),(0,e.jsx)(b,{display:{base:"flex",md:"none"},onClick:o})]}),v.map(n=>(0,e.jsx)(I,{icon:n.icon,to:n.to,children:n.name},n.name)),(0,e.jsx)(r,{flex:1}),(0,e.jsx)(x,{action:c("/logout"),method:"post",children:(0,e.jsx)(r,{as:"button",flex:1,align:"center",p:"2",px:"5",mx:"4",borderRadius:"lg",role:"group",cursor:"pointer",_hover:{bg:"cyan.100"},type:"submit",children:"Logout"})})]}),I=({icon:o,children:t,to:n,...i})=>(0,e.jsx)(y,{as:f,to:c(n),style:{textDecoration:"none"},_focus:{boxShadow:"none"},children:(0,e.jsxs)(r,{align:"center",p:"2",px:"5",mx:"4",borderRadius:"lg",role:"group",cursor:"pointer",_hover:{bg:"cyan.100"},...i,children:[o&&(0,e.jsx)(d,{mr:"4",fontSize:"16",minWidth:"20px",icon:o}),t]})}),S=({onOpen:o,...t})=>(0,e.jsxs)(r,{ml:{base:0,md:48},px:{base:4,md:24},height:"20",alignItems:"center",bg:a("white","gray.900"),borderBottomWidth:"1px",borderBottomColor:a("gray.200","gray.700"),justifyContent:"flex-start",...t,children:[(0,e.jsx)(u,{variant:"outline",onClick:o,"aria-label":"open menu",icon:(0,e.jsx)(d,{icon:"radix-icons:hamburger-menu"})}),(0,e.jsx)(m,{fontSize:"2xl",ml:"8",fontFamily:"monospace",fontWeight:"bold",children:"Runnable"})]});var R=s(l()),W=({children:o})=>(0,R.jsx)(P,{children:o});export{W as a};
