System.register(["./public-legacy.js?v=1764830988434","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1764830988434","./page_layout-legacy.js?v=1764830988434","./vue-legacy.js?v=1764830988434","./naive-legacy.js?v=1764830988434","./common-legacy.js?v=1764830988434","./__commonjsHelpers__-legacy.js?v=1764830988434"],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.gN,t=r.gO,s=r.bf},r=>{d=r.k,i=r.P,u=r.r,p=r.e,_=r.R,c=r.V,w=r.W,f=r.a3,n=r.S,m=r.U,v=r.a4},r=>{F=r.dR,y=r.dV,b=r.au},null,null],execute:function(){const e={class:"p-20px"},S={class:"w-200px"},g={class:"w-200px"},h={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,C=u(null),R=p({protocol:"tcp",s_ports:"",d_address:"",d_ports:"",brief:""}),A={s_ports:{trigger:["blur","input"],validator:()=>""!==R.s_ports.trim()&&R.s_ports?!!s(R.s_ports)||new Error(E("Security.Firewall.Forward.form_12")):new Error(E("Security.Firewall.Forward.form_3"))},d_ports:{trigger:["blur","input"],validator:()=>""!==R.d_ports.trim()&&R.d_ports?!!s(R.d_ports)||new Error(E("Security.Firewall.Forward.form_12")):new Error(E("Security.Firewall.Forward.form_7"))}},V=[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}];return T&&k&&(R.protocol=k.Protocol?k.Protocol.toLowerCase():"tcp",R.s_ports=k.S_Port||"",R.d_address=k.T_Address||"",R.d_ports=k.T_Port||"",R.brief=k.brief),d({onConfirm:async()=>{await(C.value?.validate());const r={protocol:R.protocol,S_Port:R.s_ports,T_Port:R.d_ports,T_Address:R.d_address,brief:R.brief};T&&k?await o({new_data:{...r,id:k.id},old_data:k}):await t(r),U("refresh")}}),(r,o)=>{const t=y,s=F,d=b,i=a,u=l;return c(),_("div",e,[w(i,{ref_key:"formRef",ref:C,model:m(R),rules:A},{default:f(()=>[w(s,{label:r.$t("Security.Firewall.Forward.form_1"),path:"protocol"},{default:f(()=>[n("div",S,[w(t,{value:m(R).protocol,"onUpdate:value":o[0]||(o[0]=r=>m(R).protocol=r),options:V},null,8,["value"])])]),_:1},8,["label"]),w(s,{label:r.$t("Security.Firewall.Forward.form_2"),path:"s_ports"},{default:f(()=>[n("div",g,[w(d,{value:m(R).s_ports,"onUpdate:value":o[1]||(o[1]=r=>m(R).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",h,[w(d,{value:m(R).d_address,"onUpdate:value":o[2]||(o[2]=r=>m(R).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(R).d_ports,"onUpdate:value":o[3]||(o[3]=r=>m(R).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(R).brief,"onUpdate:value":o[4]||(o[4]=r=>m(R).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})])}}}))}}});
