System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./public-legacy.js?v=1753954525509","./site-legacy.js?v=1753954525509","./index-legacy50.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./common-legacy.js?v=1753954525509","./__commonjsHelpers__-legacy.js?v=1753954525509","./index-legacy.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy4.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy7.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy5.js?v=1753954525509","./mail-legacy2.js?v=1753954525509"],(function(e,a){"use strict";var n,l,i,s,t,o,r,u,p,c,_,d,v,m,g,y,f,j,h,x,b,w,M,S,k,P,W;return{setters:[e=>{n=e._},e=>{l=e.m,i=e.c},e=>{s=e.c},e=>{t=e.b},e=>{o=e.i},e=>{r=e.k,u=e.P,p=e.r,c=e.e,_=e.aj,d=e.U,v=e.V,m=e.Q,g=e.a2,y=e.W,f=e.X,j=e.a1,h=e.j,x=e.a3,b=e.al,w=e.F},e=>{M=e.aq,S=e.cI,k=e.av,P=e.cA,W=e.cG},null,null,null,null,null,null,null],execute:function(){const a={class:"p-20px pt-24px pb-8px"},$={class:"w-240px"},I={class:"w-240px"};e("default",r({__name:"install",props:{domain:{type:Object}},emits:["refresh"],setup(e,{expose:r,emit:U}){const C=U,{t:E}=u(),H=p(null),q=c({domain:"",php_version:null}),A={domain:{trigger:"change",validator:()=>""!==q.domain.trim()||new Error(E("Mail.Setting.index_20"))},php_version:{trigger:"change",validator:()=>null!==q.php_version||new Error(E("Mail.Setting.index_21"))}},F=p([]),G=async()=>{const{message:e}=await t();if(i(e)){F.value=e.versions.reverse().map((e=>({label:e.name,value:e.version})));const a=e.versions.findIndex((e=>"74"===e.version));q.php_version=-1!==a?e.versions[a].version:e.versions[0].version}},{loading:L,setLoading:O}=s(),Q=_();return(async()=>{try{O(!0),await Promise.all([G()])}finally{O(!1)}})(),r({onConfirm:async()=>{await(H.value?.validate()),await o({webmail_domain:`${q.domain}.${e.domain?.domain||""}`,php_version:q.php_version||"",domain:e.domain?.domain||""});const{close:a}=l.success({content:()=>m(w,null,[h("WebMail Installation Successful, "),m("br",null,null),h(' Manage WebMail view in "'),m("a",{class:"bt-link",href:"javascript:;",onClick:()=>{Q.push("/site/php"),a()}},[h("Website > PHP Project")]),h('"')]),close:!0,maxWidth:480});C("refresh")}}),(l,i)=>{const s=M,t=S,o=k,r=P,u=W,p=n;return d(),v("div",a,[m(p,{ref_key:"formRef",ref:H,model:f(q),rules:A},{default:g((()=>[m(r,{label:l.$t("Mail.Setting.index_18"),path:"domain"},{default:g((()=>[y("div",$,[m(o,null,{default:g((()=>[m(s,{value:f(q).domain,"onUpdate:value":i[0]||(i[0]=e=>f(q).domain=e)},null,8,["value"]),e.domain?.domain?(d(),j(t,{key:0},{default:g((()=>[h(" ."+x(e.domain?.domain),1)])),_:1})):b("",!0)])),_:1})])])),_:1},8,["label"]),m(r,{label:l.$t("Mail.Setting.index_19"),path:"php_version"},{default:g((()=>[y("div",I,[m(u,{value:f(q).php_version,"onUpdate:value":i[1]||(i[1]=e=>f(q).php_version=e),loading:f(L),options:f(F)},null,8,["value","loading","options"])])])),_:1},8,["label"])])),_:1},8,["model"])])}}}))}}}));
