import{u as d,r as e}from"./index-Cox3ZWL0.js";import{c as b,d as j}from"./index-DFIJFuHt.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};
