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-DA7OTM4Q.js";import{i as d,c as I}from"./app-BT68AfZ-.js";import{_ as h}from"./app-B4tq9Xj4.js";import{_ as P}from"./app-CKBPOVnC.js";import{S as x}from"./app-CoJo2Ne5.js";import{M as g}from"./app-BhdzEnwZ.js";import{_ as k}from"./app-D21nXKzm.js";import{_ as v}from"./app-DQ7IohAF.js";import{_ as y}from"./app-D4kZhDW_.js";import{_ as $}from"./app-COG6uWak.js";import{_ as w}from"./app-BWsCS5pa.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-P70ZK_FT.js";import"./app-D5twQdhO.js";import"./app-BotiHebp.js";/* empty css            */import"./app-z_TsLOhk.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-DSiZNBrr.js";import"./app-DUjqI3OV.js";import"./app-D6fSNcLx.js";import"./app-up4gT9D9.js";import"./app-D29bbm9n.js";import"./app-B_5dka6q.js";import"./app-CQwVTjAx.js";import"./app-a9KqBnqw.js";import"./app-KNE_24OY.js";import"./app-Zes_jb7S.js";import"./app-DfyWLXQE.js";import"./app-CjSxNKvA.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";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};
