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