import{d as k,ab as w,L as D,h as s,P as L,r as n,o as g,c as v,a as e,b as l,w as r,H as R,a7 as C,a8 as y,k as b,t as E,l as I}from"./index.e3896b23.js";import{u as P}from"./apiGroup.d1155eaa.js";import{f as F}from"./folder.ea536bf2.js";import{a as G}from"./api.55cd055b.js";import{_ as S}from"./index.vue_vue_type_style_index_0_lang.0a9da65b.js";const U={class:"apiGroupBox"},j={class:"leftBox"},q={style:{height:"100%"},class:"apiGroupTreeDiv"},H=e("br",null,null,-1),M=e("br",null,null,-1),$={key:0},z=I("\u6DFB\u52A0\u6839\u76EE\u5F55"),J=e("br",null,null,-1),K=e("br",null,null,-1),O={class:"api-group-tree-node"},Q=["src"],W=["src"],X={style:{"margin-left":"8px"}},Y={class:"rightBox"},Z=k({name:"Data-serviceApi-groupIndex"}),ne=k({...Z,props:{ifAuth:{type:Boolean,required:!1,default:()=>!1}},setup(x){const u=x,c=w("appId");D(()=>{B()});const _=s(),d=s([]),a=s(""),p=s(),B=()=>{P().then(t=>{d.value=t.data})};L(a,t=>{_.value.filter(t)});const T=(t,o)=>t?o.label.includes(t)||o.label.includes(t.toUpperCase())||o.label.includes(t.toLowerCase()):!0,A=(t,o,f,m)=>{console.log(o.data),o.data.type=="2"&&p.value.init(o.data.id,o.data.path,c?c.value:null,u.ifAuth)};return(t,o)=>{const f=n("el-input"),m=n("el-button"),N=n("el-tree"),V=n("el-scrollbar");return g(),v("div",U,[e("div",j,[l(V,null,{default:r(()=>[e("div",q,[e("div",null,[l(f,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=h=>a.value=h),placeholder:"search"},null,8,["modelValue"]),H,M]),u.ifAuth?R("",!0):(g(),v("div",$,[l(m,{type:"primary",onClick:t.appendCatalogueRoot},{default:r(()=>[z]),_:1},8,["onClick"]),J,K])),l(N,{ref_key:"catalogueTreeRef",ref:_,data:d.value,onNodeClick:A,"default-expand-all":"","node-key":"id","filter-node-method":T},{default:r(({node:h,data:i})=>[e("div",O,[e("span",null,[C(e("img",{src:b(F)},null,8,Q),[[y,i.type=="1"]]),C(e("img",{src:b(G)},null,8,W),[[y,i.type=="2"]]),e("span",X,E(i.name),1)])])]),_:1},8,["data"])])]),_:1})]),e("div",Y,[l(S,{ref_key:"apiConfigRef",ref:p},null,512)])])}}});export{ne as _};
