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-DnroACXc.js";import{i as d,c as I}from"./app-DckefXYL.js";import{_ as h}from"./app-CbeWSR1s.js";import{_ as P}from"./app-DgsA44Do.js";import{S as x}from"./app-CijvqRui.js";import{M as k}from"./app-Bpdd-ZKh.js";import{_ as v}from"./app-35Uyu21k.js";import{_ as $}from"./app-CeaP97on.js";import{_ as g}from"./app-CjXr3cCY.js";import{_ as w}from"./app-CkWIpBVL.js";import{_ as y}from"./app-DezwSKU9.js";import"./app-C9iVkiu5.js";import"./app-DrIi-dNq.js";import"./app-zueB50zj.js";import"./app-B0NrURRk.js";import"./app-Co2SIBzr.js";import"./app-CUPmXIij.js";import"./app-Cu6FD8m8.js";import"./app-B2-Q9WJQ.js";import"./app-DAKlLAys.js";import"./app-xECxwo4T.js";import"./app-BBDtZW3a.js";/* empty css            */import"./app-C7P1WxYu.js";import"./app-R-vSvFIF.js";import"./app-HaDoyrq5.js";import"./app-CYYQ_Zep.js";import"./app-Cmxxk_WX.js";import"./app-CF8nmC-F.js";import"./app-B09rlSqG.js";import"./app-uFawAv7F.js";import"./app-BJhJ7lM8.js";import"./app-Dd07dUxy.js";import"./app-Dpl5YSiv.js";import"./app-NVAx7Sc3.js";import"./app-CF0qXH5Q.js";import"./app-BtWF1kMA.js";import"./app-BbRQPmFH.js";import"./app-B4bUdtyo.js";import"./app-LqsmzyUT.js";import"./app-rBrER_c4.js";import"./app-DM6WPmnv.js";import"./app-CGj1gg44.js";import"./app-BeuOvIof.js";import"./app-DSjO_8RR.js";import"./app-CZGZgDLc.js";import"./app-DFy7dJHP.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},Dt={__name:"allowList",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":"allowList"},null,8,["ctx"]),e(t).featureIsOn?(m(),l("div",D,[r(x,null,{default:s(()=>[r(k,{onClick:c[0]||(c[0]=_(H=>e(t).createIP("white"),["prevent"]))},{default:s(()=>[n("添加IP")]),_:1}),b,f("span",B,[n("ID: "+u(e(t).listId)+"   ",1),r(v,{content:"ID可以用于使用API操作此IP名单",class:"flex"})])]),_:1}),e(t).items.length==0?(m(),p(y,{key:0},{default:s(()=>[n("暂时还没有IP。")]),_:1})):a("",!0),e(t).items.length>0?(m(),p(w,{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(g,{data:e(t).page},null,8,["data"])])):a("",!0),e(t).featureIsOn?a("",!0):(m(),l("div",G,[r($)]))]),_:1},8,["ctx"]))}};export{Dt as default};
