import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753954525509";import{_ as e}from"./index.vue_vue_type_script_setup_true_lang2.js?v=1753954525509";import{_ as l}from"./index.vue_vue_type_script_setup_true_lang16.js?v=1753954525509";import{aj as t}from"./mail2.js?v=1753954525509";import{k as u,P as o,r as s,e as i,U as n,a1 as r,a2 as m,Q as p,X as _,W as d,al as v}from"./vue.js?v=1753954525509";import{cA as c,aq as x,c1 as f,c5 as q,cG as w}from"./naive.js?v=1753954525509";import"./index96.js?v=1753954525509";import"./page_layout.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./public.js?v=1753954525509";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=i({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=c,s=e,i=x,h=f,j=q,g=w,B=a;return n(),r(B,{ref_key:"formRef",ref:y,model:_(M),rules:k,class:"p-20px"},{default:m((()=>[p(o,{label:t.$t("Layout.Sider.mail_3"),"show-require-mark":!0},{default:m((()=>[p(l,{class:"w-280px",value:_(M).domain,"onUpdate:value":u[0]||(u[0]=a=>_(M).domain=a),all:!1},null,8,["value"])])),_:1},8,["label"]),p(o,{label:t.$t("Config.Panel.index_66"),path:"password","show-require-mark":!0},{default:m((()=>[p(s,{class:"w-280px",value:_(M).password,"onUpdate:value":u[1]||(u[1]=a=>_(M).password=a),length:8,placeholder:t.$t("Config.Panel.index_67")},null,8,["value","placeholder"])])),_:1},8,["label"]),p(o,{label:t.$t("Mail.MailBox.index_32")},{default:m((()=>[p(i,{class:"w-280px!",value:_(M).random_str,"onUpdate:value":u[2]||(u[2]=a=>_(M).random_str=a),placeholder:""},null,8,["value"])])),_:1},8,["label"]),p(o,{label:t.$t("Mail.MailBox.index_33")},{default:m((()=>[p(h,{class:"w-280px!",min:1,"show-button":!1,value:_(M).maxnum,"onUpdate:value":u[3]||(u[3]=a=>_(M).maxnum=a)},null,8,["value"])])),_:1},8,["label"]),p(o,{label:"Quota limit"},{default:m((()=>[p(j,{"checked-value":1,"unchecked-value":0,value:_(M).quota_limit,"onUpdate:value":u[4]||(u[4]=a=>_(M).quota_limit=a)},null,8,["value"])])),_:1}),_(M).quota_limit?(n(),r(o,{key:0,label:t.$t("Mail.MailBox.index_3"),path:"quota"},{default:m((()=>[p(h,{value:_(M).quota,"onUpdate:value":u[5]||(u[5]=a=>_(M).quota=a),class:"w-170px",min:1,"show-button":!1,placeholder:""},null,8,["value"]),d("div",b,[p(g,{value:_(M).quota_unit,"onUpdate:value":u[6]||(u[6]=a=>_(M).quota_unit=a),options:U},null,8,["value"])])])),_:1},8,["label"])):v("",!0)])),_:1},8,["model"])}}});export{h as default};
