System.register(["./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./ssl-legacy-BRxc0DyI.js?v=1773287522785","./utils-legacy-QJQOPO7z.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./index-legacy-hh1mlQOF.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785"],(function(e,l){"use strict";var r,a,t,o,d,i,u,p,s,n,c,_,y,v,x,b,m,h,g,f,S,w,j,L,$,k,D,U;return{setters:[e=>{r=e._},e=>{a=e.f,t=e.U},e=>{o=e.a,d=e.t,i=e.e,u=e.h},e=>{p=e.t},e=>{s=e.a1,n=e.b,c=e.a6,_=e.k,y=e.B,v=e._,x=e.a8},e=>{b=e.k,m=e.c,h=e.R,g=e.r,f=e.e,S=e.$,w=e.a8,j=e.a9,L=e.a0,$=e._,k=e.S,D=e.j,U=e.ak},null,null],execute:function(){const l={class:"w-300px"};e("default",b({__name:"domain-form",props:{row:{},isEdit:{type:Boolean},onRefresh:{}},setup(e,{expose:b}){const P=p(),C=e,{isEdit:M,row:X,onRefresh:q}=C,E=m((()=>M&&X?X.provider_name.includes("CloudFlare"):o.value.includes("CloudFlare"))),{t:R}=h(),T=g(null),F=f({record_type:"A",record_value:"",ttl:1,ps:"",proxy:0,priority:10,record:""}),B={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=P.address},A=()=>({id:M&&X?X.id:null,pid:u.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)})(),b({onConfirm:async()=>{await(T.value?.validate()),M&&X?await a(A()):await t(A()),q()}}),(e,a)=>{const t=n,o=s,i=c,u=y,p=_,b=v,m=x,h=r;return S(),w(h,{class:"p-20px",ref_key:"formRef",ref:T,model:k(F),rules:B},{default:j((()=>[L(o,{label:e.$t("SSL.Domain.index_11"),path:"record"},{default:j((()=>[$("div",l,[L(t,{value:k(F).record,"onUpdate:value":a[0]||(a[0]=e=>k(F).record=e),placeholder:e.$t("SSL.Domain.index_12"),disabled:k(M)},null,8,["value","placeholder","disabled"])])])),_:1},8,["label"]),L(o,{label:e.$t("Ftp.Table.index_3"),path:"record_type"},{default:j((()=>[L(i,{class:"w-300px",value:k(F).record_type,"onUpdate:value":a[1]||(a[1]=e=>k(F).record_type=e),options:k(d),disabled:k(M)},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:k(F).record_value,"onUpdate:value":a[2]||(a[2]=e=>k(F).record_value=e),placeholder:e.$t("SSL.Domain.index_14")},null,8,["value","placeholder"]),L(u,{onClick:z},{default:j((()=>a[7]||(a[7]=[D(" USE IP ")]))),_:1,__:[7]})])),_:1})])),_:1},8,["label"]),L(o,{label:"TTL",path:"ttl"},{default:j((()=>[L(b,{"show-button":!1,class:"w-300px!",value:k(F).ttl,"onUpdate:value":a[3]||(a[3]=e=>k(F).ttl=e),placeholder:e.$t("SSL.Domain.index_15")},null,8,["value","placeholder"])])),_:1}),"MX"===k(F).record_type?(S(),w(o,{key:0,label:"Priority",path:"priority"},{default:j((()=>[L(b,{"show-button":!1,class:"w-300px!",value:k(F).priority,"onUpdate:value":a[4]||(a[4]=e=>k(F).priority=e),placeholder:"Please enter the priority",min:1,max:65535},null,8,["value"])])),_:1})):U("",!0),L(o,{label:e.$t("Public.Table.Ps"),path:"ps"},{default:j((()=>[L(t,{class:"w-300px!",value:k(F).ps,"onUpdate:value":a[5]||(a[5]=e=>k(F).ps=e),placeholder:e.$t("Crontab.arrange.index_27")},null,8,["value","placeholder"])])),_:1},8,["label"]),k(E)&&"MX"!==k(F).record_type?(S(),w(o,{key:1,label:e.$t("SSL.Domain.index_16"),path:"proxy"},{default:j((()=>[L(m,{value:k(F).proxy,"onUpdate:value":a[6]||(a[6]=e=>k(F).proxy=e),"checked-value":1,"unchecked-value":0},null,8,["value"])])),_:1},8,["label"])):U("",!0)])),_:1},8,["model"])}}}))}}}));
