// @bun
var H=Object.defineProperty;var f=(q)=>q;function w(q,z){this[q]=f.bind(null,z)}var d=(q,z)=>{for(var A in z)H(q,A,{get:z[A],enumerable:!0,configurable:!0,set:w.bind(z,A)})};var a=(q,z)=>()=>(q&&(z=q(q=0)),z);import{Select as C,SelectContent as I,SelectItem as g,SelectTrigger as v,SelectValue as k}from"@contractspec/lib.ui-kit-web/ui/select";import*as Z from"react";import{jsx as E,jsxs as K}from"react/jsx-runtime";function _({title:q,subtitle:z,workspaceSelect:A,projectSelect:J,environmentSelect:D,stickyHeaderOffsetPx:U,headerRight:X}){return E("div",{className:"sticky top-0 z-10 border-border border-b bg-card",style:{top:U??0},children:K("div",{className:"mx-auto flex w-full max-w-7xl flex-col gap-3 px-4 py-3 md:flex-row md:items-center md:justify-between",children:[K("div",{className:"min-w-0",children:[K("div",{className:"flex items-center gap-2",children:[E("p",{className:"truncate font-semibold text-base",children:q}),z?E("p",{className:"hidden text-muted-foreground text-sm md:block",children:z}):null]}),K("div",{className:"mt-2 flex flex-wrap gap-2",children:[A?E(Y,{select:A}):null,J?E(Y,{select:J}):null,D?E(Y,{select:D}):null]})]}),E("div",{className:"flex items-center justify-between gap-2 md:justify-end",children:X})]})})}function Y({select:q}){let z=Z.useId();return K("div",{className:"flex min-w-[220px] flex-col gap-1",children:[E("span",{id:z,className:"text-muted-foreground text-xs",children:q.label}),K(C,{value:q.value,onValueChange:q.onChange,children:[E(v,{"aria-labelledby":z,className:"w-full",children:E(k,{placeholder:q.placeholder??q.label})}),E(I,{children:q.options.map((A)=>E(g,{value:A.value,children:A.label},A.value))})]})]})}import{Sidebar as M,SidebarContent as h,SidebarFooter as p,SidebarHeader as m,SidebarMenu as b,SidebarMenuButton as $,SidebarMenuItem as T,SidebarRail as u}from"@contractspec/lib.ui-kit-web/ui/sidebar";import{Settings as S}from"lucide-react";import{jsx as G,jsxs as L}from"react/jsx-runtime";function V({modules:q,activeModuleId:z,onModuleChange:A,sidebarFooter:J}){return L(M,{children:[G(u,{}),G(m,{}),G(h,{children:L(b,{children:[q.map((D)=>G(T,{children:L($,{isActive:D.id===z,onClick:()=>A(D.id),children:[D.icon,G("span",{children:D.label}),D.badge!=null?G("span",{className:"ml-auto text-muted-foreground text-xs",children:String(D.badge)}):null]})},D.id)),G(T,{children:L($,{isActive:z==="settings",onClick:()=>A("settings"),children:[G(S,{className:"size-4"}),G("span",{children:"Settings"})]})})]})}),G(p,{children:J})]})}import{SidebarInset as x,SidebarProvider as j}from"@contractspec/lib.ui-kit-web/ui/sidebar";import{cn as n}from"@contractspec/lib.ui-kit-web/ui/utils";import{jsx as Q,jsxs as B}from"react/jsx-runtime";function Eq({title:q,subtitle:z,workspaceSelect:A,projectSelect:J,environmentSelect:D,stickyHeaderOffsetPx:U,headerRight:X,modules:N,activeModuleId:y,onModuleChange:O,sidebarFooter:W,assistant:F,children:P,className:R}){return B(j,{children:[Q(V,{modules:N,activeModuleId:y,onModuleChange:O,sidebarFooter:W}),Q(x,{children:B("div",{className:n("min-h-svh bg-background",R),children:[Q(_,{title:q,subtitle:z,workspaceSelect:A,projectSelect:J,environmentSelect:D,stickyHeaderOffsetPx:U,headerRight:X}),Q("main",{className:"m-4",children:P})]})}),F]})}export{Eq as WorkspaceProjectShellLayout};
