import{au as a,r as n,U as c,z as m,k as p,av as l}from"./index-DTC0Ed21.js";const f=e=>{const{data:s}=a();return n.useMemo(()=>s!=null&&s.Projects?e.map(u=>s==null?void 0:s.Projects.find(t=>t.Id===u)).filter(Boolean):[],[s==null?void 0:s.Projects,e])},N=e=>{const s=n.useMemo(()=>c(e)?[]:m(e)?[e].filter(r=>!isNaN(r)):p(e.filter(r=>!isNaN(r))),[e]),u=f(s),{data:t,...i}=l.useGetTaskTypesQuery(u.map(r=>r.Id||0),{skip:!s.length||!u.length}),o=n.useMemo(()=>(t==null?void 0:t.list)||[],[t]);return{...i,data:t,taskTypes:o}};export{N as u};
