System.register(["./public-legacy.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./common-legacy.js?v=1753954525509","./__commonjsHelpers__-legacy.js?v=1753954525509"],(function(r,e){"use strict";var l,a,o,t,s,d,i,u,_,p,c,w,f,n,m,v,F,y,b;return{setters:[r=>{l=r._},r=>{a=r._},r=>{o=r.aP,t=r.fZ,s=r.f_},r=>{d=r.k,i=r.P,u=r.r,_=r.e,p=r.U,c=r.V,w=r.Q,f=r.a2,n=r.W,m=r.X,v=r.a3},r=>{F=r.cG,y=r.cA,b=r.aq},null,null],execute:function(){const e={class:"p-20px"},S={class:"w-200px"},h={class:"w-200px"},g={class:"w-200px"},x={class:"w-200px"},$={class:"w-200px"};r("default",d({__name:"form",props:{row:{},isEdit:{type:Boolean,default:!1}},emits:["refresh"],setup(r,{expose:d,emit:P}){const j=r,U=P,{t:E}=i(),{isEdit:T,row:k}=j,A=u(null),C=_({protocol:"tcp",s_ports:"",d_address:"",d_ports:"",brief:""}),q={s_ports:{trigger:["blur","input"],validator:()=>""!==C.s_ports.trim()&&C.s_ports?!!o(C.s_ports)||new Error(E("Security.Firewall.Forward.form_12")):new Error(E("Security.Firewall.Forward.form_3"))},d_ports:{trigger:["blur","input"],validator:()=>""!==C.d_ports.trim()&&C.d_ports?!!o(C.d_ports)||new Error(E("Security.Firewall.Forward.form_12")):new Error(E("Security.Firewall.Forward.form_7"))}},B=[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}];return T&&k&&(C.protocol=k.Protocol?k.Protocol.toLowerCase():"tcp",C.s_ports=k.S_Port||"",C.d_address=k.T_Address||"",C.d_ports=k.T_Port||"",C.brief=k.brief),d({onConfirm:async()=>{await(A.value?.validate());const r={protocol:C.protocol,S_Port:C.s_ports,T_Port:C.d_ports,T_Address:C.d_address,brief:C.brief};T&&k?await t({new_data:{...r,id:k.id},old_data:k}):await s(r),U("refresh")}}),(r,o)=>{const t=F,s=y,d=b,i=a,u=l;return p(),c("div",e,[w(i,{ref_key:"formRef",ref:A,model:m(C),rules:q},{default:f((()=>[w(s,{label:r.$t("Security.Firewall.Forward.form_1"),path:"protocol"},{default:f((()=>[n("div",S,[w(t,{value:m(C).protocol,"onUpdate:value":o[0]||(o[0]=r=>m(C).protocol=r),options:B},null,8,["value"])])])),_:1},8,["label"]),w(s,{label:r.$t("Security.Firewall.Forward.form_2"),path:"s_ports"},{default:f((()=>[n("div",h,[w(d,{value:m(C).s_ports,"onUpdate:value":o[1]||(o[1]=r=>m(C).s_ports=r),placeholder:r.$t("Security.Firewall.Forward.form_3")},null,8,["value","placeholder"])])])),_:1},8,["label"]),w(s,{label:r.$t("Security.Firewall.Forward.form_4"),path:"d_address"},{default:f((()=>[n("div",g,[w(d,{value:m(C).d_address,"onUpdate:value":o[2]||(o[2]=r=>m(C).d_address=r),placeholder:r.$t("Security.Firewall.Forward.form_5")},null,8,["value","placeholder"])])])),_:1},8,["label"]),w(s,{label:r.$t("Security.Firewall.Forward.form_6"),path:"d_ports"},{default:f((()=>[n("div",x,[w(d,{value:m(C).d_ports,"onUpdate:value":o[3]||(o[3]=r=>m(C).d_ports=r),placeholder:r.$t("Security.Firewall.Forward.form_7")},null,8,["value","placeholder"])])])),_:1},8,["label"]),w(s,{label:r.$t("Security.Firewall.Forward.form_8"),path:"brief","show-feedback":!1},{default:f((()=>[n("div",$,[w(d,{value:m(C).brief,"onUpdate:value":o[4]||(o[4]=r=>m(C).brief=r),placeholder:r.$t("Security.Firewall.Forward.form_9")},null,8,["value","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"]),w(u,{class:"mt-20px ml-40px"},{default:f((()=>[n("li",null,v(r.$t("Security.Firewall.Forward.form_10")),1),n("li",null,v(r.$t("Security.Firewall.Forward.form_11")),1)])),_:1})])}}}))}}}));
