System.register(["./public-legacy.js?v=1763625242172","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1763625242172","./index-legacy99.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(e,l){"use strict";var a,r,t,i,s,u,d,c,o,n,p,f,y,_,m,v,w,b,h;return{setters:[e=>{a=e._},e=>{r=e._},e=>{t=e._},e=>{i=e.gS,s=e.gT},e=>{u=e.k,d=e.P,c=e.r,o=e.e,n=e.R,p=e.S,f=e.X,y=e.a3,_=e.U,m=e.V,v=e.a4},e=>{w=e.dP,b=e.dV,h=e.au},null,null],execute:function(){const l={class:"p-20px"},P={class:"w-200px"},S={class:"w-200px"},g={class:"w-200px"},I={class:"w-200px"};e("default",u({__name:"form",props:{row:{},isEdit:{type:Boolean,default:!1}},emits:["refresh"],setup(e,{expose:u,emit:F}){const x=e,j=F,{t:U}=d(),{isEdit:$,row:T}=x,k=c(null),E=o({address:"",types:"accept",chain:"INPUT",brief:""}),C={address:{trigger:["blur","input"],validator:()=>!(""===E.address.trim()||!E.address)||new Error(U("Security.Firewall.IP.form_10"))}},N=[{label:U("Security.Firewall.IP.form_11"),value:"accept"},{label:U("Security.Firewall.IP.form_12"),value:"drop"}],R=[{label:U("Security.Firewall.IP.form_13"),value:"INPUT"},{label:U("Security.Firewall.IP.form_14"),value:"OUTPUT"}];return $&&T&&(E.address=T.Address,E.types=T.Strategy,E.chain=T.Chain,E.brief=T.brief),u({onConfirm:async()=>{await(k.value?.validate());const e={address:E.address,types:E.types,strategy:E.types,chain:E.chain,brief:E.brief,family:"ipv4"};$&&T?await i({new_data:{...e,id:T.id},old_data:T}):await s(e),j("refresh")}}),(e,i)=>{const s=t,u=w,d=b,c=h,o=r,F=a;return n(),p("div",l,[f(o,{ref_key:"formRef",ref:k,model:m(E),rules:C},{default:y((()=>[f(u,{label:e.$t("Security.Firewall.IP.form_16"),path:"address"},{default:y((()=>[_("div",P,[f(s,{value:m(E).address,"onUpdate:value":i[0]||(i[0]=e=>m(E).address=e),rows:3,disabled:m($),placeholder:e.$t("Security.Firewall.IP.form_1")},null,8,["value","disabled","placeholder"])])])),_:1},8,["label"]),f(u,{label:e.$t("Security.Firewall.IP.form_2"),path:"types"},{default:y((()=>[_("div",S,[f(d,{value:m(E).types,"onUpdate:value":i[1]||(i[1]=e=>m(E).types=e),options:N},null,8,["value"])])])),_:1},8,["label"]),f(u,{label:e.$t("Security.Firewall.IP.form_3"),path:"chain"},{default:y((()=>[_("div",g,[f(d,{value:m(E).chain,"onUpdate:value":i[2]||(i[2]=e=>m(E).chain=e),options:R},null,8,["value"])])])),_:1},8,["label"]),f(u,{label:e.$t("Security.Firewall.IP.form_4"),path:"brief","show-feedback":!1},{default:y((()=>[_("div",I,[f(c,{value:m(E).brief,"onUpdate:value":i[3]||(i[3]=e=>m(E).brief=e),placeholder:e.$t("Security.Firewall.IP.form_5")},null,8,["value","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"]),f(F,{class:"mt-20px ml-40px"},{default:y((()=>[_("li",null,v(e.$t("Security.Firewall.IP.form_15")),1),_("li",null,v(e.$t("Security.Firewall.IP.form_8")),1),_("li",null,v(e.$t("Security.Firewall.IP.form_9")),1)])),_:1})])}}}))}}}));
