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