System.register(["./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1753954525509","./public-legacy.js?v=1753954525509","./utils-legacy3.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./common-legacy.js?v=1753954525509","./__commonjsHelpers__-legacy.js?v=1753954525509"],(function(e,l){"use strict";var r,a,t,o,d,u,i,p,c,n,s,_,y,v,m,x,b,h,g,f,S,w,j,L,D,U,$,k;return{setters:[e=>{r=e._},e=>{a=e.V,t=e.as},e=>{o=e.a,d=e.t,u=e.h,i=e.c},e=>{p=e.u},e=>{c=e.aq,n=e.cA,s=e.cG,_=e.ay,y=e.bY,v=e.c1,m=e.c5},e=>{x=e.k,b=e.c,h=e.P,g=e.r,f=e.e,S=e.U,w=e.a1,j=e.a2,L=e.Q,D=e.W,U=e.X,$=e.j,k=e.al},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 P=p(),X=e,{isEdit:q,row:C,onRefresh:M}=X,E=b((()=>q&&C?C.provider_name.includes("CloudFlare"):o.value.includes("CloudFlare"))),{t:T}=h(),F=g(null),R=f({record_type:"A",record_value:"",ttl:1,ps:"",proxy:0,priority:10,record:""}),A={record:{required:!0,trigger:"change",message:T("SSL.Domain.index_12")},record_value:{required:!0,trigger:["blur","change"],message:T("SSL.Domain.index_14")},ttl:{required:!0,trigger:"blur",type:"number",message:T("SSL.Domain.index_15")},priority:{required:!0,trigger:"blur",type:"number",message:"Please enter the priority"}},z=()=>{R.record_value=P.address},B=()=>({id:q&&C?C.id:null,pid:u.value,domain:i.value,record:R.record,record_type:R.record_type,record_value:R.record_value,ttl:R.ttl,ps:R.ps,proxy:E.value&&"MX"!==R.record_type?R.proxy:-1,priority:"MX"===R.record_type?R.priority:-1});return(()=>{const{row:e,isEdit:l}=X;l&&e&&(R.record=e.record,R.record_type=e.record_type,R.record_value=e.record_value,R.ttl=e.ttl,R.ps=e.ps,R.proxy=e.proxy,R.priority="MX"===R.record_type?e.priority:-1)})(),x({onConfirm:async()=>{await(F.value?.validate()),q&&C?await a(B()):await t(B()),M()}}),(e,a)=>{const t=c,o=n,u=s,i=_,p=y,x=v,b=m,h=r;return S(),w(h,{class:"p-20px",ref_key:"formRef",ref:F,model:U(R),rules:A},{default:j((()=>[L(o,{label:e.$t("SSL.Domain.index_11"),path:"record"},{default:j((()=>[D("div",l,[L(t,{value:U(R).record,"onUpdate:value":a[0]||(a[0]=e=>U(R).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(u,{class:"w-300px",value:U(R).record_type,"onUpdate:value":a[1]||(a[1]=e=>U(R).record_type=e),options:U(d),disabled:U(q)},null,8,["value","options","disabled"])])),_:1},8,["label"]),L(o,{label:e.$t("SSL.Domain.index_13"),path:"record_value"},{default:j((()=>[L(p,{class:"flex-nowrap!",size:5},{default:j((()=>[L(t,{class:"w-300px!",value:U(R).record_value,"onUpdate:value":a[2]||(a[2]=e=>U(R).record_value=e),placeholder:e.$t("SSL.Domain.index_14")},null,8,["value","placeholder"]),L(i,{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,{min:1,max:1800,"show-button":!1,class:"w-300px!",value:U(R).ttl,"onUpdate:value":a[3]||(a[3]=e=>U(R).ttl=e),placeholder:e.$t("SSL.Domain.index_15")},null,8,["value","placeholder"])])),_:1}),"MX"===U(R).record_type?(S(),w(o,{key:0,label:"Priority",path:"priority"},{default:j((()=>[L(x,{"show-button":!1,class:"w-300px!",value:U(R).priority,"onUpdate:value":a[4]||(a[4]=e=>U(R).priority=e),placeholder:"Please enter the priority",min:1,max:65535},null,8,["value"])])),_:1})):k("",!0),L(o,{label:e.$t("Public.Table.Ps"),path:"ps"},{default:j((()=>[L(t,{class:"w-300px!",value:U(R).ps,"onUpdate:value":a[5]||(a[5]=e=>U(R).ps=e),placeholder:e.$t("Crontab.arrange.index_27")},null,8,["value","placeholder"])])),_:1},8,["label"]),U(E)&&"MX"!==U(R).record_type?(S(),w(o,{key:1,label:e.$t("SSL.Domain.index_16"),path:"proxy"},{default:j((()=>[L(b,{value:U(R).proxy,"onUpdate:value":a[6]||(a[6]=e=>U(R).proxy=e),"checked-value":1,"unchecked-value":0},null,8,["value"])])),_:1},8,["label"])):k("",!0)])),_:1},8,["model"])}}}))}}}));
