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-SC54XQDl.js";import{i as d,c as I}from"./app-Ba7ZqSpq.js";import{_ as h}from"./app-DJCl4rzT.js";import{_ as P}from"./app-Cft_lrsr.js";import{S as x}from"./app-4SRx_643.js";import{M as k}from"./app-C3Fl2Gyv.js";import{_ as v}from"./app-COkia88n.js";import{_ as $}from"./app-rIYFLdeU.js";import{_ as g}from"./app-DZcB_Zcx.js";import{_ as w}from"./app-DK6yt561.js";import{_ as y}from"./app-D9UgVOV0.js";import"./app-CL60OiIv.js";import"./app-D9TrJBlL.js";import"./app-_Ovp2dOH.js";import"./app-BjSCO7rC.js";import"./app-Dhl-Bw0H.js";import"./app-B2C_dtYI.js";import"./app-COidJXl1.js";import"./app-qhR41k1m.js";import"./app-CS3AUTAk.js";import"./app-CCkWSX4Q.js";/* empty css            */import"./app-B9xxzP2y.js";import"./app-C28obFWS.js";import"./app-CkINxBL9.js";import"./app-PPG0ZS4d.js";import"./app--Lj8zATS.js";import"./app-Ch8j4za4.js";import"./app-C2mBgI5Z.js";import"./app-DHsI_tns.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-DgoEZtNT.js";import"./app-Dw0jKdCD.js";import"./app-DnXuoh8P.js";import"./app-C8HFiBxn.js";import"./app-FlPLZh9D.js";import"./app-DZaelcLs.js";import"./app-CNHjdV6U.js";import"./app-CukjbZvY.js";import"./app-Crd12MWL.js";import"./app-g-bJrEAS.js";import"./app-D_RBJHM6.js";import"./app-CmrRgGIA.js";import"./app-DyP4Nide.js";import"./app-D3Qbxi9D.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:"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{Ct as default};
