var M=Object.defineProperty;var N=(q)=>q;function Q(q,z){this[q]=N.bind(null,z)}var _=(q,z)=>{for(var B in z)M(q,B,{get:z[B],enumerable:!0,configurable:!0,set:Q.bind(z,B)})};var $=(q,z)=>()=>(q&&(z=q(q=0)),z);import{Select as U,SelectContent as W,SelectItem as X,SelectTrigger as Y,SelectValue as Z}from"@contractspec/lib.ui-kit-web/ui/select";import*as J from"react";import{jsx as A,jsxs as D}from"react/jsx-runtime";function y({title:q,subtitle:z,workspaceSelect:B,projectSelect:F,environmentSelect:G,stickyHeaderOffsetPx:K,headerRight:L}){return A("div",{className:"sticky top-0 z-10 border-border border-b bg-card",style:{top:K??0},children:D("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:[D("div",{className:"min-w-0",children:[D("div",{className:"flex items-center gap-2",children:[A("p",{className:"truncate font-semibold text-base",children:q}),z?A("p",{className:"hidden text-muted-foreground text-sm md:block",children:z}):null]}),D("div",{className:"mt-2 flex flex-wrap gap-2",children:[B?A(E,{select:B}):null,F?A(E,{select:F}):null,G?A(E,{select:G}):null]})]}),A("div",{className:"flex items-center justify-between gap-2 md:justify-end",children:L})]})})}function E({select:q}){let z=J.useId();return D("div",{className:"flex min-w-[220px] flex-col gap-1",children:[A("span",{id:z,className:"text-muted-foreground text-xs",children:q.label}),D(U,{value:q.value,onValueChange:q.onChange,children:[A(Y,{"aria-labelledby":z,className:"w-full",children:A(Z,{placeholder:q.placeholder??q.label})}),A(W,{children:q.options.map((B)=>A(X,{value:B.value,children:B.label},B.value))})]})]})}export{y as WorkspaceHeader};
