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