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