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