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