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