import{u as d,r as e}from"./index-ea7817a2.js";import{e as b,f as j}from"./index-b96fda11.js";const p=()=>{const{id:a}=d(),{data:t=[],isLoading:n}=b(a),{data:o,isLoading:r}=j({subjectNames:t,projectId:a},{skip:t.length===0}),s=e.useMemo(()=>o??[],[o]),u=e.useCallback(i=>s.find(m=>m.name===i),[s]),c=r||n;return e.useMemo(()=>({subjects:s,isLoading:c,getSubjectByName:u}),[s,c,u])};export{p as u};
