import{x as a}from"./page_layout.js?v=1763625242172";import{d as e}from"./public.js?v=1763625242172";import{a as s}from"./mail.js?v=1763625242172";import{k as l,ad as t,ae as n,r as o,R as u,a2 as i,V as r}from"./vue.js?v=1763625242172";import{dV as m}from"./naive.js?v=1763625242172";const p=l({__name:"index",props:t({isInit:{type:Boolean,default:!1}},{value:{},valueModifiers:{}}),emits:t(["change"],["update:value"]),setup(l,{expose:t,emit:p}){const v=l,d=p,{loading:g,setLoading:c}=e(),f=n(l,"value"),j=o([]),y=(a,e)=>{d("change",a,e)},h=async()=>{try{c(!0);const{message:e}=await s();a(e)&&e.length>0&&(j.value=[],j.value=e.map((a=>({label:a.username,value:a.username,data:a}))),f.value||(f.value=e[0].username,d("change",e[0].username,j.value[0])))}finally{c(!1)}};return v.isInit&&h(),t({getList:h}),(a,e)=>{const s=m;return u(),i(s,{value:f.value,"onUpdate:value":[e[0]||(e[0]=a=>f.value=a),y],loading:r(g),filterable:!0,options:r(j)},null,8,["value","loading","options"])}}});export{p as _};
