import{b2 as t,l as e,ah as s,$ as a}from"./utils-lib.js?v=1761009159";import{_ as i}from"./index105.js?v=1761009159";import{c as l,w as o,g as r,q as m,v as n,x as p,e as c,B as u,y as f,N as d,z as _,D as j}from"./base-lib.js?v=1761009159";import{p as v,q as h,r as k,u as y,v as b,h as x,w as L,x as B,T as w}from"./index473.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./site.js?v=1761009159";import"./column.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./useStore4.js?v=1761009159";const g=l({__name:"ip-list",setup(l){o(()=>x.value.ip_limit,t=>{t?b(t):(L.white=[],L.black=[])},{deep:!0});const g=r(()=>"ipWhiteList"===v.value?h.value:k.value),{BtOperation:I}=t({options:[{type:"button",label:"添加IP".concat("ipBlackList"===v.value?"黑":"白","名单"),active:!0,onClick:y}]});return m(()=>{b(x.value.ip_limit)}),(t,l)=>{const o=e,r=s,m=i,y=a;return n(),p("div",null,[c(m,null,{"header-left":u(()=>[c(f(I))]),content:u(()=>["ipWhiteList"===f(v)?(n(),d(o,{key:0,ref_key:"ipWhiteListRef",ref:h,data:f(L).white,"max-height":390,column:f(B)},{empty:u(()=>l[0]||(l[0]=[_("div",{class:"flex items-center justify-center"},"当前列表为空",-1)])),_:1},8,["data","column"])):j("",!0),"ipBlackList"===f(v)?(n(),d(o,{key:1,ref_key:"ipListRef",ref:k,data:f(L).black,"max-height":390,column:f(B)},{empty:u(()=>l[1]||(l[1]=[_("div",{class:"flex items-center justify-center"},"当前列表为空",-1)])),_:1},8,["data","column"])):j("",!0)]),"footer-left":u(()=>[c(r,{"table-ref":f(g),options:f(w)},null,8,["table-ref","options"])]),_:1}),"ipBlackList"!==f(v)?(n(),d(y,{key:0,class:"mt-[2rem] ml-[1.6rem]",options:[{content:"注意：设置IP白名单后会默认禁止除白名单以外的所有IP访问"}]})):j("",!0)])}}});export{g as default};
