import{i as h,c as v}from"./app-a6cKceqE.js";import{_ as I}from"./app-CVTokSi9.js";import{_ as k}from"./app-Ufpj4Ll4.js";import{T as x}from"./app-CrjU8lgK.js";import{_ as y,a as _}from"./app-DxbU-QrX.js";import{_ as P}from"./app-DvvLeaLT.js";import{_ as w}from"./app-BsFusN7_.js";import{_ as g}from"./app-uhTxLRnQ.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-BYcXwl4U.js";import"./app-DCd54JMo.js";import"./app-MrAtUXr3.js";import"./app-BWSI2Z1R.js";import"./app-DPDEogA0.js";import"./app-DxjODhok.js";import"./app-CabATHnR.js";import"./app-BhzV4gWo.js";import"./app-ysQ8KbGS.js";import"./app-Cp3gmk2J.js";import"./app--MWyBMkA.js";import"./app-BG60hdvp.js";import"./app-CNARLpXE.js";import"./app-SxAW7vhf.js";import"./app-D5k1HLu9.js";import"./app-BDgR0DSb.js";import"./app-DwtlHtUX.js";import"./app-BHl80pFw.js";import"./app-DwDoXV5j.js";import"./app-W_y7sflh.js";import"./app-CJCAnMrx.js";import"./app-Cc2zXvHs.js";import"./app-aSafd0Me.js";import"./app-Btbk6LWy.js";import"./app-CrkKi1Ag.js";import"./app-u5shTDG_.js";import"./app-VC1SYszA.js";import"./app-yF7sElvF.js";import"./app-CqkleIqs.js";import"./app-CO4sV-Ic.js";import"./app-yt37eDzA.js";import"./app-BQ5ggxk2.js";import"./app-D3zbrzdO.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};
