import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{_ as e}from"./index.vue_vue_type_script_setup_true_lang2.js?v=1763625242172";import{_ as l}from"./index.vue_vue_type_script_setup_true_lang16.js?v=1763625242172";import{aj as t}from"./mail.js?v=1763625242172";import{k as u,P as o,r as s,e as n,R as i,a2 as r,a3 as d,X as m,V as p,U as _,an as v}from"./vue.js?v=1763625242172";import{dP as x,au as c,df as f,dj as q,dV as w}from"./naive.js?v=1763625242172";import"./index98.js?v=1763625242172";import"./page_layout.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./public.js?v=1763625242172";const b={class:"w-100px ml-10px"},h=u({__name:"batch",props:{data:{}},setup(u,{expose:h}){const j=u,{getList:g}=j.data,{t:B}=o(),y=s(null),M=n({domain:"",password:"",random_str:"",maxnum:20,quota:5,quota_unit:"GB",quota_limit:1}),U=[{label:"GB",value:"GB"},{label:"MB",value:"MB"}],k={password:{required:!0,trigger:"blur",message:B("Config.Panel.index_67")}};return h({onConfirm:async()=>{var a;await(null==(a=y.value)?void 0:a.validate()),await t({domain:M.domain,password:M.password,random_str:M.random_str,maxnum:M.maxnum||20,quota:M.quota?M.quota+" "+M.quota_unit:"5 GB",quota_active:M.quota_limit}),null==g||g()}}),(t,u)=>{const o=x,s=e,n=c,h=f,j=q,g=w,B=a;return i(),r(B,{ref_key:"formRef",ref:y,model:p(M),rules:k,class:"p-20px"},{default:d((()=>[m(o,{label:t.$t("Layout.Sider.mail_3"),"show-require-mark":!0},{default:d((()=>[m(l,{class:"w-280px",value:p(M).domain,"onUpdate:value":u[0]||(u[0]=a=>p(M).domain=a),all:!1},null,8,["value"])])),_:1},8,["label"]),m(o,{label:t.$t("Config.Panel.index_66"),path:"password","show-require-mark":!0},{default:d((()=>[m(s,{class:"w-280px",value:p(M).password,"onUpdate:value":u[1]||(u[1]=a=>p(M).password=a),length:8,placeholder:t.$t("Config.Panel.index_67")},null,8,["value","placeholder"])])),_:1},8,["label"]),m(o,{label:t.$t("Mail.MailBox.index_32")},{default:d((()=>[m(n,{class:"w-280px!",value:p(M).random_str,"onUpdate:value":u[2]||(u[2]=a=>p(M).random_str=a),placeholder:""},null,8,["value"])])),_:1},8,["label"]),m(o,{label:t.$t("Mail.MailBox.index_33")},{default:d((()=>[m(h,{class:"w-280px!",min:1,"show-button":!1,value:p(M).maxnum,"onUpdate:value":u[3]||(u[3]=a=>p(M).maxnum=a)},null,8,["value"])])),_:1},8,["label"]),m(o,{label:"Quota limit"},{default:d((()=>[m(j,{"checked-value":1,"unchecked-value":0,value:p(M).quota_limit,"onUpdate:value":u[4]||(u[4]=a=>p(M).quota_limit=a)},null,8,["value"])])),_:1}),p(M).quota_limit?(i(),r(o,{key:0,label:t.$t("Mail.MailBox.index_3"),path:"quota"},{default:d((()=>[m(h,{value:p(M).quota,"onUpdate:value":u[5]||(u[5]=a=>p(M).quota=a),class:"w-170px",min:1,"show-button":!1,placeholder:""},null,8,["value"]),_("div",b,[m(g,{value:p(M).quota_unit,"onUpdate:value":u[6]||(u[6]=a=>p(M).quota_unit=a),options:U},null,8,["value"])])])),_:1},8,["label"])):v("",!0)])),_:1},8,["model"])}}});export{h as default};
