import{d as C,al as S,ao as V,am as F,Q as T,k as E,j as R,w as $,a9 as m,o as n,c,M as d,u as b,G as p,U as j,F as G,a0 as M,E as _,J as f,a as z,L as y,K as A}from"./vue.6daa721c.js";import{A as D,i as J,E as K,j as L}from"./index.ae7ce77b.js";import{_ as Q}from"./_plugin-vue_export-helper.c27b6911.js";import"./elementPlus.346c766a.js";import"./echarts.72dc8373.js";const U={key:0,class:"layout-navbars-breadcrumb"},q={key:0,class:"layout-navbars-breadcrumb-span"},H={key:1},O=C({name:"layoutBreadcrumb"}),P=C({...O,setup(W){const k=D(),B=J(),{themeConfig:a}=S(B),{routesList:h}=S(k),r=V();F();const e=T({breadcrumbList:[],routeSplit:[],routeSplitFirst:"",routeSplitIndex:1}),w=E(()=>{i(r.path);const{layout:s,isBreadcrumb:o}=a.value;return s==="classic"||s==="transverse"?!1:!!o}),x=()=>{a.value.isCollapse=!a.value.isCollapse,I()},I=()=>{L.remove("themeConfig"),L.set("themeConfig",a.value)},g=s=>{s.forEach(o=>{e.routeSplit.forEach((u,v,l)=>{e.routeSplitFirst===o.path&&(e.routeSplitFirst+=`/${l[e.routeSplitIndex]}`,e.breadcrumbList.push(o),e.routeSplitIndex++,o.children&&g(o.children))})})},i=s=>{if(!a.value.isBreadcrumb)return!1;e.breadcrumbList=[h.value[0]],e.routeSplit=s.split("/"),e.routeSplit.shift(),e.routeSplitFirst=`/${e.routeSplit[0]}`,e.routeSplitIndex=1,g(h.value),(r.name==="home"||r.name==="notFound"&&e.breadcrumbList.length>1)&&e.breadcrumbList.shift(),e.breadcrumbList.length>0&&(e.breadcrumbList[e.breadcrumbList.length-1].meta.tagsViewName=K.setTagsViewNameI18n(r))};return R(()=>{i(r.path)}),$(()=>r.path,()=>{i(r.path)},{deep:!0}),(s,o)=>{const u=m("SvgIcon"),v=m("el-breadcrumb-item"),l=m("el-breadcrumb");return w.value?(n(),c("div",U,[d(u,{class:"layout-navbars-breadcrumb-icon",name:b(a).isCollapse?"ele-Expand":"ele-Fold",size:16,onClick:x},null,8,["name"]),d(l,{class:"layout-navbars-breadcrumb-hide"},{default:p(()=>[d(j,{name:"breadcrumb"},{default:p(()=>[(n(!0),c(G,null,M(e.breadcrumbList,(t,N)=>(n(),_(v,{key:t.meta.tagsViewName?t.meta.tagsViewName:t.meta.title},{default:p(()=>[N===e.breadcrumbList.length-1?(n(),c("span",q,[b(a).isBreadcrumbIcon?(n(),_(u,{key:0,name:t.meta.icon,class:"layout-navbars-breadcrumb-iconfont"},null,8,["name"])):f("",!0),z("div",null,y(t.meta.tagsViewName?t.meta.tagsViewName:t.meta.title),1)])):(n(),c("a",H,[b(a).isBreadcrumbIcon?(n(),_(u,{key:0,name:t.meta.icon,class:"layout-navbars-breadcrumb-iconfont"},null,8,["name"])):f("",!0),A(" "+y(s.$t(t.meta.title)),1)]))]),_:2},1024))),128))]),_:1})]),_:1})])):f("",!0)}}});const ae=Q(P,[["__scopeId","data-v-70059684"]]);export{ae as default};
