import{o as m,c as p,w as s,u as e,b as r,g as l,i as _,f as n,a as f,t as u,h as a}from"./app-BYcXwl4U.js";import{i as d,c as I}from"./app-a6cKceqE.js";import{_ as h}from"./app-DStQB5ZD.js";import{_ as P}from"./app-C3oVnfUH.js";import{S as x}from"./app-B2La8cAv.js";import{M as g}from"./app-DgSNSZFm.js";import{_ as k}from"./app-BsFusN7_.js";import{_ as v}from"./app-B8JChEZz.js";import{_ as y}from"./app-Wy4FFEmL.js";import{_ as $}from"./app-DvvLeaLT.js";import{_ as w}from"./app-uhTxLRnQ.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-CLawzVMq.js";import"./app-BeFNDz9n.js";import"./app-BDgR0DSb.js";/* empty css            */import"./app-CJCAnMrx.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-ysQ8KbGS.js";import"./app-Cc2zXvHs.js";import"./app-D7QVa3_6.js";import"./app-CO4sV-Ic.js";import"./app-yt37eDzA.js";import"./app-BQ5ggxk2.js";import"./app-D3zbrzdO.js";import"./app-DwtlHtUX.js";import"./app-BHl80pFw.js";import"./app-CrjU8lgK.js";import"./app-DwDoXV5j.js";import"./app-W_y7sflh.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";function C(){const{utils:i,Tea:t}=d(this);this.updateItem=function(o){i.popup(t.url(".updateIPPopup?listId="+this.listId,{itemId:o}),{height:i.POPUP_HEIGHT_LG,callback:function(){i.success("保存成功",function(){i.reload()})}})},this.deleteItem=function(o){i.confirm("确定要删除这个IP吗？",function(){this.$post(".deleteIP").params({listId:this.listId,itemId:o}).refresh()})},this.createIP=function(o){i.popup("/servers/server/settings/waf/ipadmin/createIPPopup?listId="+this.listId+"&type="+o,{height:i.POPUP_HEIGHT_LG,callback:function(){i.reload()}})}}const D={key:0},b=f("span",{class:"item"},"|",-1),B={class:"item flex items-center"},G={key:1},Ct={__name:"greyList",setup(i){const t=I(new C);return(o,c)=>(m(),p(P,{ctx:e(t)},{default:s(()=>[r(h,{ctx:e(t),"active-tab":"greyList"},null,8,["ctx"]),e(t).featureIsOn?(m(),l("div",D,[r(x,null,{default:s(()=>[r(g,{onClick:c[0]||(c[0]=_(H=>e(t).createIP("grey"),["prevent"]))},{default:s(()=>[n("添加IP")]),_:1}),b,f("span",B,[n("ID: "+u(e(t).listId)+"   ",1),r(y,{content:"ID可以用于使用API操作此IP名单；灰名单中的IP仅作为记录和观察使用，不影响黑名单和白名单的作用。",class:"flex"})])]),_:1}),e(t).items.length==0?(m(),p(w,{key:0},{default:s(()=>[n("暂时还没有IP。")]),_:1})):a("",!0),e(t).items.length>0?(m(),p($,{key:1,"v-items":e(t).items,onUpdateItem:e(t).updateItem,onDeleteItem:e(t).deleteItem,"v-can-update":!0},null,8,["v-items","onUpdateItem","onDeleteItem"])):a("",!0),r(k,{data:e(t).page},null,8,["data"])])):a("",!0),e(t).featureIsOn?a("",!0):(m(),l("div",G,[r(v)]))]),_:1},8,["ctx"]))}};export{Ct as default};
