import{i as h,c as v}from"./app-BT68AfZ-.js";import{_ as I}from"./app-BaR-k2Jy.js";import{_ as k}from"./app-DuUYZNNT.js";import{T as x}from"./app-Zes_jb7S.js";import{_ as y,a as _}from"./app-BHFzVhjx.js";import{_ as P}from"./app-COG6uWak.js";import{_ as w}from"./app-D21nXKzm.js";import{_ as g}from"./app-BWsCS5pa.js";import{o as a,g as d,b as m,u as e,a as o,w as r,f as n,h as u,c,F as f,D as V,t as L}from"./app-DA7OTM4Q.js";import"./app-scFtFqL8.js";import"./app-DREBJ-ou.js";import"./app-CWBL8eTX.js";import"./app-CnGe5nlE.js";import"./app-OC5wWJiS.js";import"./app-BX4pd6U-.js";import"./app-Bhreb6Cm.js";import"./app-DSiZNBrr.js";import"./app-C5ROEzFd.js";import"./app-Bnbo6OlJ.js";import"./app-Dxa5h-uG.js";import"./app-AbPAjGV5.js";import"./app-BqY8p2gl.js";import"./app-C-GI59rl.js";import"./app-BotiHebp.js";import"./app-a9KqBnqw.js";import"./app-KNE_24OY.js";import"./app-DfyWLXQE.js";import"./app-CjSxNKvA.js";import"./app-z_TsLOhk.js";import"./app-DUjqI3OV.js";import"./app-45ZaIHUI.js";import"./app-SLkqftrw.js";import"./app-BxVwOz69.js";import"./app-WOreqTiW.js";import"./app-uDv2WI9p.js";import"./app-yF7sElvF.js";import"./app-CqkleIqs.js";import"./app-up4gT9D9.js";import"./app-D29bbm9n.js";import"./app-B_5dka6q.js";import"./app-CQwVTjAx.js";function $(){const{utils:i,Tea:t}=h(this);this.updateItem=function(l){i.popup(t.url(".updateIPPopup",{itemId:l}),{height:i.POPUP_HEIGHT_LG,callback:function(){i.success("保存成功",function(){i.reload()})}})},this.deleteItem=function(l){i.confirm("确定要删除这个IP吗？",function(){this.$post(".deleteIP").params({itemId:l}).refresh()})},this.createIP=function(){i.popup(t.url(".createIPPopup",{listId:this.list.id}),{height:i.POPUP_HEIGHT_LG,callback:function(){i.success("保存成功",function(){i.reload()})}})}}const T={action:"/waf/iplists/items"},U=["value"],b={class:"ui fields inline"},B={class:"ui field"},C={class:"ui field"},D={class:"ui field"},G=["href"],H=o("div",{class:"margin"},null,-1),wt={__name:"items",setup(i){const t=v(new $);return(l,p)=>(a(),d(f,null,[m(I,{ctx:e(t),"active-tab":"item"},null,8,["ctx"]),o("form",T,[o("input",{type:"hidden",name:"listId",value:e(t).list.id},null,8,U),o("div",b,[o("div",B,[m(k,{size:"20",placeholder:"x.x.x.x",name:"keyword",modelValue:e(t).keyword,"onUpdate:modelValue":p[0]||(p[0]=s=>e(t).keyword=s)},null,8,["modelValue"])]),o("div",C,[m(y,{name:"eventLevel",modelValue:e(t).eventLevel,"onUpdate:modelValue":p[1]||(p[1]=s=>e(t).eventLevel=s)},{default:r(()=>[m(_,{value:""},{default:r(()=>[n("[级别]")]),_:1}),(a(!0),d(f,null,V(e(t).eventLevels,s=>(a(),c(_,{value:s.code},{default:r(()=>[n(L(s.name),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue"])]),o("div",D,[m(x,{secondary:"",type:"submit"},{default:r(()=>[n("搜索")]),_:1}),n("   "),e(t).keyword.length>0||e(t).eventLevel.length>0?(a(),d("a",{key:0,href:"/waf/iplists/items?listId="+e(t).list.id},"[清除条件]",8,G)):u("",!0)])]),H]),e(t).items.length==0?(a(),c(g,{key:0},{default:r(()=>[n("暂时还没有IP。")]),_:1})):u("",!0),e(t).items.length>0?(a(),c(P,{key:1,"v-items":e(t).items,onUpdateItem:e(t).updateItem,onDeleteItem:e(t).deleteItem,"v-keyword":e(t).keyword},null,8,["v-items","onUpdateItem","onDeleteItem","v-keyword"])):u("",!0),m(w,{data:e(t).page},null,8,["data"])],64))}};export{wt as default};
