import{u as e,b2 as a,an as s,ao as t,cO as l,Q as i,n as o,f7 as r,P as n,f8 as d,ap as c,_ as p}from"./utils-lib.js?v=1761009159";import{_ as u}from"./index105.js?v=1761009159";import{u as m}from"./useStore9.js?v=1761009159";import{u as _}from"./index143.js?v=1761009159";import{s as v,j as f,r as y,c as b,e as h,C as k,q as g,n as j,v as x,x as C,y as E,B,K as O}from"./base-lib.js?v=1761009159";import"./validator.js?v=1761009159";import"./index.vue_vue_type_style_index_0_scoped_cdc7f4d3_lang.js?v=1761009159";import{a as D,u as H}from"./column.js?v=1761009159";import{g as R,a as T,b as P,c as I,d as L,e as N,r as S,s as w,f as A}from"./useController9.js?v=1761009159";const V=f("NODE-ADD-STORE",()=>{const a=e();v(a);const s=y(),t=y({address:"",api_key:"",category_id:"0",remarks:""});return{isEdit:y(!1),addNodeRef:s,nodeForm:t,isVerify:y(!1)}}),q=()=>v(V()),M={class:"module-ui"},F=p(b({__name:"index",setup(p){const{mainHeight:v}=e(),{rowData:f,isRefreshNodeList:y,searchWidth:b,nodeStatus:V,nodeCategory:F,forcedFlushes:W,setNodeInfo:z}=m(),{isEdit:K}=q(),Q=e=>"local"===e.api_key&&"local"===e.app_key,G=e=>a=>!(""!==a.api_key||""!==a.app_key||!a.ssh_conf||!Object.keys(a.ssh_conf).length)||e(a),J=()=>W.value=1,U=e=>(f.value=e,K.value=!!e,o({title:"".concat(e?"编辑节点【".concat(e.address,"】"):"添加节点"),area:50,btn:"".concat(e?"保存":"确认"),compData:e||{},component:()=>i(()=>import("./index341.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)})),X=_({key:"category_id",name:"节点分类",field:"name",options:()=>[{label:"全部分类",value:"all"}],event:{get:I,add:r,delete:e=>n({request:d(e),success:()=>{V.value=[],y.value=!0}})},ignore:["0"],showEdit:!1}),{BtOperation:Y}=a({options:[{type:"button",label:"添加节点",active:!0,onClick:()=>U()}]}),Z=c([{label:"设置分类",value:"setClass",event:async(e,a,s,t,l,i)=>{w(s,l,re,i)}},{label:"重启面板",value:"panel",event:A},{label:"重启服务器",value:"server",event:A},{label:"删除节点",value:"delete",event:A}]),{BtTable:$,BtPage:ee,BtSearch:ae,BtRefresh:se,BtColumn:te,BtBatch:le,BtTableCategory:ie,BtErrorMask:oe,classList:re,config:ne}=s({request:e=>("all"===e.category_id&&(e.category_id=""),1===W.value&&(e.refresh=1),R(e)),columns:[D({type:"page",key:"id"}),{label:"节点名称",width:"auto",prop:"remarks",isCustom:!0},{label:"地址",prop:"address",minWidth:120},T(),P(),{label:"分类",isCustom:!0,prop:"category_id",render:e=>{var a;return(null==(a=F.value.find(a=>Number(a.value)===Number(e.category_id)))?void 0:a.label)||"默认分类"}},H([{onClick:L,title:"访问",isHide:G(e=>"local"===e.api_key&&"local"===e.app_key||""!==e.lpver)},{onClick:e=>(z.value=e,o({title:"".concat(e?"管理节点【".concat(e.address,"】"):"节点管理"),area:90,component:()=>i(()=>import("./index342.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)})),title:"管理",isHide:Q},{onClick:N,title:"删除",isHide:Q},{isMore:!0,menu:[{key:"edit",title:"编辑",isHide:Q},{key:"panel",title:"重启面板",isHide:G(Q)},{key:"server",title:"重启服务器",isHide:G(Q)}],isHide:Q,onClick:(e,a)=>{if("edit"===e)U(a);else S(a,e)}}])],extension:[X,Z,t(y),l()],empty:()=>h("span",null,[k("您的列表为空，您可以"),h("span",{class:"bt-link",onClick:()=>U()},[k("创建一个节点")])])});return g(()=>{j(()=>{i(()=>import("./index342.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),i(()=>import("./index343.js?v=1761009159"),__vite__mapDeps([]),import.meta.url)})}),(e,a)=>{const s=u;return x(),C("div",M,[h(E(oe)),h(s,null,{"header-left":B(()=>[h(E(Y))]),"header-right":B(()=>[h(E(ie),{class:"!w-[140px] mr-[10px]"}),h(E(ae),{class:O(["mr-[10px]","!w-[".concat(E(b),"px]")]),placeholder:"请输入节点名称"},null,8,["class"]),h(E(se),{class:"mr-[10px]",onclick:J}),h(E(te))]),content:B(()=>[h(E($),{"min-height":E(v)},null,8,["min-height"])]),"footer-left":B(()=>[h(E(le))]),"footer-right":B(()=>[h(E(ee))]),_:1})])}}}),[["__scopeId","data-v-d45e9143"]]),W=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"}));export{W as i,q as u};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
