System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./utils-legacy3.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172"],(function(e,l){"use strict";var r,a,t,o,d,u,p,i,n,c,s,_,y,v,m,x,h,b,g,f,S,w,j,L,D,U,$,P;return{setters:[e=>{r=e._},e=>{a=e.u,t=e.db,o=e.h0},e=>{d=e.a,u=e.t,p=e.h,i=e.e},e=>{n=e.au,c=e.dP,s=e.dV,_=e.aC,y=e.d9,v=e.df,m=e.dj},e=>{x=e.k,h=e.c,b=e.P,g=e.r,f=e.e,S=e.R,w=e.a2,j=e.a3,L=e.X,D=e.U,U=e.V,$=e.j,P=e.an},null,null,null],execute:function(){const l={class:"w-300px"};e("default",x({__name:"domain-form",props:{row:{},isEdit:{type:Boolean},onRefresh:{}},setup(e,{expose:x}){const k=a(),C=e,{isEdit:X,row:M,onRefresh:q}=C,E=h((()=>X&&M?M.provider_name.includes("CloudFlare"):d.value.includes("CloudFlare"))),{t:R}=b(),T=g(null),F=f({record_type:"A",record_value:"",ttl:1,ps:"",proxy:0,priority:10,record:""}),V={record:{required:!0,trigger:"change",message:R("SSL.Domain.index_12")},record_value:{required:!0,trigger:["blur","change"],message:R("SSL.Domain.index_14")},ttl:{required:!0,trigger:"blur",type:"number",message:R("SSL.Domain.index_15")},priority:{required:!0,trigger:"blur",type:"number",message:"Please enter the priority"}},z=()=>{F.record_value=k.address},A=()=>({id:X&&M?M.id:null,pid:p.value,domain:i.value,record:F.record,record_type:F.record_type,record_value:F.record_value,ttl:F.ttl,ps:F.ps,proxy:E.value&&"MX"!==F.record_type?F.proxy:-1,priority:"MX"===F.record_type?F.priority:-1});return(()=>{const{row:e,isEdit:l}=C;l&&e&&(F.record=e.record,F.record_type=e.record_type,F.record_value=e.record_value,F.ttl=e.ttl,F.ps=e.ps,F.proxy=e.proxy,F.priority="MX"===F.record_type?e.priority:-1)})(),x({onConfirm:async()=>{await(T.value?.validate()),X&&M?await t(A()):await o(A()),q()}}),(e,a)=>{const t=n,o=c,d=s,p=_,i=y,x=v,h=m,b=r;return S(),w(b,{class:"p-20px",ref_key:"formRef",ref:T,model:U(F),rules:V},{default:j((()=>[L(o,{label:e.$t("SSL.Domain.index_11"),path:"record"},{default:j((()=>[D("div",l,[L(t,{value:U(F).record,"onUpdate:value":a[0]||(a[0]=e=>U(F).record=e),placeholder:e.$t("SSL.Domain.index_12")},null,8,["value","placeholder"])])])),_:1},8,["label"]),L(o,{label:e.$t("Ftp.Table.index_3"),path:"record_type"},{default:j((()=>[L(d,{class:"w-300px",value:U(F).record_type,"onUpdate:value":a[1]||(a[1]=e=>U(F).record_type=e),options:U(u),disabled:U(X)},null,8,["value","options","disabled"])])),_:1},8,["label"]),L(o,{label:e.$t("SSL.Domain.index_13"),path:"record_value"},{default:j((()=>[L(i,{class:"flex-nowrap!",size:5},{default:j((()=>[L(t,{class:"w-300px!",value:U(F).record_value,"onUpdate:value":a[2]||(a[2]=e=>U(F).record_value=e),placeholder:e.$t("SSL.Domain.index_14")},null,8,["value","placeholder"]),L(p,{onClick:z},{default:j((()=>a[7]||(a[7]=[$(" USE IP ")]))),_:1,__:[7]})])),_:1})])),_:1},8,["label"]),L(o,{label:"TTL",path:"ttl"},{default:j((()=>[L(x,{"show-button":!1,class:"w-300px!",value:U(F).ttl,"onUpdate:value":a[3]||(a[3]=e=>U(F).ttl=e),placeholder:e.$t("SSL.Domain.index_15")},null,8,["value","placeholder"])])),_:1}),"MX"===U(F).record_type?(S(),w(o,{key:0,label:"Priority",path:"priority"},{default:j((()=>[L(x,{"show-button":!1,class:"w-300px!",value:U(F).priority,"onUpdate:value":a[4]||(a[4]=e=>U(F).priority=e),placeholder:"Please enter the priority",min:1,max:65535},null,8,["value"])])),_:1})):P("",!0),L(o,{label:e.$t("Public.Table.Ps"),path:"ps"},{default:j((()=>[L(t,{class:"w-300px!",value:U(F).ps,"onUpdate:value":a[5]||(a[5]=e=>U(F).ps=e),placeholder:e.$t("Crontab.arrange.index_27")},null,8,["value","placeholder"])])),_:1},8,["label"]),U(E)&&"MX"!==U(F).record_type?(S(),w(o,{key:1,label:e.$t("SSL.Domain.index_16"),path:"proxy"},{default:j((()=>[L(h,{value:U(F).proxy,"onUpdate:value":a[6]||(a[6]=e=>U(F).proxy=e),"checked-value":1,"unchecked-value":0},null,8,["value"])])),_:1},8,["label"])):P("",!0)])),_:1},8,["model"])}}}))}}}));
