var f=Object.defineProperty;var w=(q)=>q;function I(q,z){this[q]=w.bind(null,z)}var i=(q,z)=>{for(var A in z)f(q,A,{get:z[A],enumerable:!0,configurable:!0,set:I.bind(z,A)})};var o=(q,z)=>()=>(q&&(z=q(q=0)),z);import{Select as g,SelectContent as C,SelectItem as v,SelectTrigger as k,SelectValue as M}from"@contractspec/lib.ui-kit-web/ui/select";import*as T from"react";import{jsx as E,jsxs as L}from"react/jsx-runtime";function V({title:q,subtitle:z,workspaceSelect:A,projectSelect:K,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: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(Y,{select:A}):null,K?E(Y,{select:K}):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=T.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(g,{value:q.value,onValueChange:q.onChange,children:[E(k,{"aria-labelledby":z,className:"w-full",children:E(M,{placeholder:q.placeholder??q.label})}),E(C,{children:q.options.map((A)=>E(v,{value:A.value,children:A.label},A.value))})]})]})}import{Sidebar as h,SidebarContent as p,SidebarFooter as b,SidebarHeader as m,SidebarMenu as u,SidebarMenuButton as y,SidebarMenuItem as B,SidebarRail as S}from"@contractspec/lib.ui-kit-web/ui/sidebar";import{Settings as x}from"lucide-react";import{jsx as G,jsxs as Q}from"react/jsx-runtime";function N({modules:q,activeModuleId:z,onModuleChange:A,sidebarFooter:K}){return Q(h,{children:[G(S,{}),G(m,{}),G(p,{children:Q(u,{children:[q.map((D)=>G(B,{children:Q(y,{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(B,{children:Q(y,{isActive:z==="settings",onClick:()=>A("settings"),children:[G(x,{className:"size-4"}),G("span",{children:"Settings"})]})})]})}),G(b,{children:K})]})}import{BundleProvider as j,BundleRenderer as d}from"@contractspec/lib.surface-runtime/react";import{SidebarProvider as n}from"@contractspec/lib.ui-kit-web/ui/sidebar";import{jsx as J}from"react/jsx-runtime";function Gq({plan:q,title:z,subtitle:A,workspaceSelect:K,projectSelect:D,environmentSelect:U,stickyHeaderOffsetPx:X,headerRight:O,modules:W,activeModuleId:F,onModuleChange:P,sidebarFooter:R,assistant:Z,children:H,className:_}){let $={header:J(V,{title:z,subtitle:A,workspaceSelect:K,projectSelect:D,environmentSelect:U,stickyHeaderOffsetPx:X,headerRight:O}),sidebar:J(N,{modules:W,activeModuleId:F,onModuleChange:P,sidebarFooter:R}),primary:J("main",{className:_?`m-4 ${_}`:"m-4",children:H})};if(Z!=null)$.assistant=Z;return J(n,{children:J(j,{plan:q,children:J("div",{className:"min-h-svh bg-background",children:J(d,{slotContent:$})})})})}export{Gq as WorkspaceShellRenderer};
