System.register(["./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./check-legacy-DG4HeWug.js?v=1773287522785","./firewall-legacy-BLYDdl9f.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785"],(function(r,e){"use strict";var l,a,o,t,s,d,i,u,p,_,c,w,f,n,v,F,m,y,b;return{setters:[r=>{l=r._},r=>{a=r._},null,r=>{o=r.a},r=>{t=r.B,s=r.C},r=>{d=r.k,i=r.R,u=r.r,p=r.e,_=r.$,c=r.Z,w=r.a0,f=r.a9,n=r._,v=r.S,F=r.aa},r=>{m=r.a1,y=r.a6,b=r.b},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:j}){const P=r,E=j,{t:U}=i(),{isEdit:T,row:k}=P,C=u(null),A=p({protocol:"tcp",s_ports:"",d_address:"",d_ports:"",brief:""}),B={s_ports:{trigger:["blur","input"],validator:()=>""!==A.s_ports.trim()&&A.s_ports?!!o(A.s_ports)||new Error(U("Security.Firewall.Forward.form_12")):new Error(U("Security.Firewall.Forward.form_3"))},d_ports:{trigger:["blur","input"],validator:()=>""!==A.d_ports.trim()&&A.d_ports?!!o(A.d_ports)||new Error(U("Security.Firewall.Forward.form_12")):new Error(U("Security.Firewall.Forward.form_7"))}},R=[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}];return T&&k&&(A.protocol=k.Protocol?k.Protocol.toLowerCase():"tcp",A.s_ports=k.S_Port||"",A.d_address=k.T_Address||"",A.d_ports=k.T_Port||"",A.brief=k.brief),d({onConfirm:async()=>{await(C.value?.validate());const r={protocol:A.protocol,S_Port:A.s_ports,T_Port:A.d_ports,T_Address:A.d_address,brief:A.brief};T&&k?await t({new_data:{...r,id:k.id},old_data:k}):await s(r),E("refresh")}}),(r,o)=>{const t=y,s=m,d=b,i=a,u=l;return _(),c("div",e,[w(i,{ref_key:"formRef",ref:C,model:v(A),rules:B},{default:f((()=>[w(s,{label:r.$t("Security.Firewall.Forward.form_1"),path:"protocol"},{default:f((()=>[n("div",S,[w(t,{value:v(A).protocol,"onUpdate:value":o[0]||(o[0]=r=>v(A).protocol=r),options:R},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:v(A).s_ports,"onUpdate:value":o[1]||(o[1]=r=>v(A).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:v(A).d_address,"onUpdate:value":o[2]||(o[2]=r=>v(A).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:v(A).d_ports,"onUpdate:value":o[3]||(o[3]=r=>v(A).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:v(A).brief,"onUpdate:value":o[4]||(o[4]=r=>v(A).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,F(r.$t("Security.Firewall.Forward.form_10")),1),n("li",null,F(r.$t("Security.Firewall.Forward.form_11")),1)])),_:1})])}}}))}}}));
