import{n as f}from"./index-BTglIPU2.js?v=1773287522785";import{c as g}from"./mail-COTHIXbY.js?v=1773287522785";import{u as v}from"./useLoading-CZ2gSAW7.js?v=1773287522785";import{k as _,R as b,an as y,r as x,$ as B,a8 as M,S as u,ao as w}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a6 as D}from"./naive-ui--dJnpVcV.js?v=1773287522785";const C=_({__name:"index",props:w({all:{type:Boolean,default:!0},showTag:{type:Boolean,default:!0}},{value:{},valueModifiers:{}}),emits:["update:value"],setup(l){const t=l,{t:s}=b(),n=y(l,"value"),o=x([]),r=({option:e})=>t.showTag?"".concat(s("Mail.MailBox.index_29")).concat(e.label):"".concat(e.label),m=()=>{o.value.unshift({label:s("Public.All"),value:""})},{loading:c,setLoading:i}=v();return(async()=>{try{i(!0);const{message:e}=await g();f(e)&&(o.value=e.map(a=>({label:a,value:a})),t.all?m():n.value=e[0]||"")}finally{i(!1)}})(),(e,a)=>{const p=D;return B(),M(p,{value:n.value,"onUpdate:value":a[0]||(a[0]=d=>n.value=d),"consistent-menu-width":!1,options:u(o),loading:u(c),"render-tag":r,filterable:!0},null,8,["value","options","loading"])}}});export{C as _};
