import{g as u}from"./index-5a47c360-1785478469326v=1.0.0.js";import{E as m}from"./eleVendor-bc05bc4d-1785478469326v=1.0.0.js";import{r as p,k as y}from"./vendor-46662d77-1785478469326v=1.0.0.js";const b=(f=!0,i=!1)=>{const r=p([]),g=async(s,l)=>{const e=await u({page:1,size:10,collegeName:s,isUndergraduate:1,...l});e.code===0&&(r.value=e.data.listData.map(o=>({label:o.collegeName,value:o.collegeId})),i&&r.value.unshift({label:"\u5168\u90E8",value:-1}))},d=async(s,l,e,o)=>{l.loading=!0;let c=[];try{let a={page:l.page,size:10,collegeName:s,isUndergraduate:1,...o};e&&(Array.isArray(e)?a.collegeIds=e:a.collegeId=e);const t=await u(a);if(t.code===0)return c=t.data.listData.map(n=>({label:`${n.collegeName}`,value:n.collegeId})),[c,t.data.total]}catch(a){m.error("\u83B7\u53D6\u5B66\u9662\u5217\u8868\u5931\u8D25"),console.error({error:a})}finally{l.loading=!1}};return y(()=>{f&&g("")}),{getCollageList:g,collageList:r,getPageCollageList:d}};export{b as u};
