import{j as e,r as o,s as p}from"./vendor-tanstack-BVzzyDEt.js";import{dM as f,V as S,X as B,Y as y,Z as L,$ as k,_ as g,a0 as v,a1 as i,B as w,a as D,b as d,bq as x,bz as b,bB as W}from"./index-BJkJ93Lr.js";const E=({presetOptions:r=[],selected:a,onSelect:l,workPoolName:t})=>e.jsx(o.Suspense,{children:e.jsx(q,{presetOptions:r,selected:a,onSelect:l,workPoolName:t})}),q=({presetOptions:r=[],selected:a,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(s=>s.name.toLowerCase().includes(n.toLowerCase())),[u,n]),j=o.useMemo(()=>r.filter(s=>s.label.toLowerCase().includes(n.toLowerCase())),[n,r]);return e.jsxs(S,{children:[e.jsx(B,{selected:!!a,"aria-label":"Select a work queue",children:a}),e.jsxs(y,{children:[e.jsx(L,{value:c,onValueChange:m,placeholder:"Search for a work queue..."}),e.jsx(k,{children:"No work queue found"}),e.jsx(g,{children:e.jsxs(v,{children:[j.map(s=>e.jsx(i,{selected:a===s.value,onSelect:()=>{l(s.value),m("")},value:String(s.label),children:s.label},s.label)),h.map(s=>e.jsx(i,{selected:a===s.name,onSelect:C=>{l(C),m("")},value:s.name,children:s.name},s.id))]})})]})]})},M=({deployment:r,action:a})=>e.jsx(w,{children:e.jsxs(D,{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:a})})]})});export{M as D,E as W};
//# sourceMappingURL=deployment-action-header-f2FkVo9D.js.map
