import{_ as C}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{_ as M}from"./index.vue_vue_type_script_setup_true_lang-DG86e1NA.js?v=1773287522785";import{_ as U}from"./index.vue_vue_type_script_setup_true_lang-DCuz-_aa.js?v=1773287522785";import{al as h}from"./mail-COTHIXbY.js?v=1773287522785";import{k as y,R as G,r as P,e as N,$ as _,a8 as p,a9 as s,a0 as n,S as o,_ as R,ak as V}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as S,b as I,_ as O,a8 as Q,a6 as j}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./index-K4YGya6V.js?v=1773287522785";import"./index-BTglIPU2.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./useLoading-CZ2gSAW7.js?v=1773287522785";const z={class:"w-100px ml-10px"},Y=y({__name:"batch",props:{data:{}},setup(d,{expose:f}){const c=d,{getList:r}=c.data,{t:v}=G(),i=P(null),a=N({domain:"",password:"",random_str:"",maxnum:20,quota:5,quota_unit:"GB",quota_limit:1}),b=[{label:"GB",value:"GB"},{label:"MB",value:"MB"}],w={password:{required:!0,trigger:"blur",message:v("Config.Panel.index_67")}},q=()=>({domain:a.domain,password:a.password,random_str:a.random_str,maxnum:a.maxnum||20,quota:a.quota?a.quota+" "+a.quota_unit:"5 GB",quota_active:a.quota_limit});return f({onConfirm:async()=>{var l;await((l=i.value)==null?void 0:l.validate()),await h(q()),r==null||r()}}),(l,e)=>{const u=S,x=M,g=I,m=O,B=Q,$=j,k=C;return _(),p(k,{ref_key:"formRef",ref:i,model:o(a),rules:w,class:"p-20px"},{default:s(()=>[n(u,{label:l.$t("Layout.Sider.mail_3"),"show-require-mark":!0},{default:s(()=>[n(U,{class:"w-280px",value:o(a).domain,"onUpdate:value":e[0]||(e[0]=t=>o(a).domain=t),all:!1},null,8,["value"])]),_:1},8,["label"]),n(u,{label:l.$t("Config.Panel.index_66"),path:"password","show-require-mark":!0},{default:s(()=>[n(x,{class:"w-280px",value:o(a).password,"onUpdate:value":e[1]||(e[1]=t=>o(a).password=t),length:8,placeholder:l.$t("Config.Panel.index_67")},null,8,["value","placeholder"])]),_:1},8,["label"]),n(u,{label:l.$t("Mail.MailBox.index_32")},{default:s(()=>[n(g,{class:"w-280px!",value:o(a).random_str,"onUpdate:value":e[2]||(e[2]=t=>o(a).random_str=t),placeholder:""},null,8,["value"])]),_:1},8,["label"]),n(u,{label:l.$t("Mail.MailBox.index_33")},{default:s(()=>[n(m,{class:"w-280px!",min:1,"show-button":!1,value:o(a).maxnum,"onUpdate:value":e[3]||(e[3]=t=>o(a).maxnum=t)},null,8,["value"])]),_:1},8,["label"]),n(u,{label:"Quota limit"},{default:s(()=>[n(B,{"checked-value":1,"unchecked-value":0,value:o(a).quota_limit,"onUpdate:value":e[4]||(e[4]=t=>o(a).quota_limit=t)},null,8,["value"])]),_:1}),o(a).quota_limit?(_(),p(u,{key:0,label:l.$t("Mail.MailBox.index_3"),path:"quota"},{default:s(()=>[n(m,{value:o(a).quota,"onUpdate:value":e[5]||(e[5]=t=>o(a).quota=t),class:"w-170px",min:1,"show-button":!1,placeholder:""},null,8,["value"]),R("div",z,[n($,{value:o(a).quota_unit,"onUpdate:value":e[6]||(e[6]=t=>o(a).quota_unit=t),options:b},null,8,["value"])])]),_:1},8,["label"])):V("",!0)]),_:1},8,["model"])}}});export{Y as default};
