import{Ar as e,Rt as t}from"./index-C_dP75wD.js";import{o as n}from"./VContainer-DGQjsCTw.js";import{t as r}from"./apiError-BgZlS-MZ.js";function i(){let i=e([]),a=e(!1),o=n();async function s(e){a.value=!0;try{i.value=(await t.getList(`/servers/`,{per_page:e?.perPage??200})).items}catch(e){i.value=[],o(r(e,`加载服务器列表失败`),`error`)}finally{a.value=!1}}return{servers:i,loading:a,loadServers:s}}export{i as t};