import{w as a}from"./page_layout.js?v=1753954525509";import{c as e}from"./public.js?v=1753954525509";import{a as s}from"./mail2.js?v=1753954525509";import{k as l,ab as t,ac as n,r as o,U as u,a1 as i,X as r}from"./vue.js?v=1753954525509";import{cG as m}from"./naive.js?v=1753954525509";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,c=p,{loading:g,setLoading:d}=e(),f=n(l,"value"),j=o([]),y=(a,e)=>{c("change",a,e)},b=async()=>{try{d(!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,c("change",e[0].username,j.value[0])))}finally{d(!1)}};return v.isInit&&b(),t({getList:b}),(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 _};
