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