import{j as e,r as o,y as p}from"./vendor-tanstack-BpuysabX.js";import{dY as f,ak as S,al as y,am as B,an as k,ap as L,ao as g,aq as D,ar as i,B as v,g as w,h as d,bD as x,bQ as b,bS as W}from"./index-CREafGO4.js";const E=({presetOptions:r=[],selected:s,onSelect:l,workPoolName:t})=>e.jsx(o.Suspense,{children:e.jsx(q,{presetOptions:r,selected:s,onSelect:l,workPoolName:t})}),q=({presetOptions:r=[],selected:s,onSelect:l,workPoolName:t})=>{const[c,m]=o.useState(""),{data:u}=p(f({work_pool_name:t})),n=o.useDeferredValue(c),h=o.useMemo(()=>u.filter(a=>a.name.toLowerCase().includes(n.toLowerCase())),[u,n]),j=o.useMemo(()=>r.filter(a=>a.label.toLowerCase().includes(n.toLowerCase())),[n,r]);return e.jsxs(S,{children:[e.jsx(y,{selected:!!s,"aria-label":"Select a work queue",children:s}),e.jsxs(B,{children:[e.jsx(k,{value:c,onValueChange:m,placeholder:"Search for a work queue..."}),e.jsx(L,{children:"No work queue found"}),e.jsx(g,{children:e.jsxs(D,{children:[j.map(a=>e.jsx(i,{selected:s===a.value,onSelect:()=>{l(a.value),m("")},value:String(a.label),children:a.label},a.label)),h.map(a=>e.jsx(i,{selected:s===a.name,onSelect:C=>{l(C),m("")},value:a.name,children:a.name},a.id))]})})]})]})},P=({deployment:r,action:s})=>e.jsx(v,{children:e.jsxs(w,{children:[e.jsx(d,{children:e.jsx(x,{to:"/deployments",className:"text-xl font-semibold",children:"Deployments"})}),e.jsx(b,{}),e.jsx(d,{children:e.jsx(x,{to:"/deployments/deployment/$id",params:{id:r.id},className:"text-xl font-semibold",children:r.name})}),e.jsx(b,{}),e.jsx(d,{className:"text-xl font-semibold",children:e.jsx(W,{children:s})})]})});export{P as D,E as W};
//# sourceMappingURL=deployment-action-header-DZalyt8q.js.map
