import{B as e,aB as t,aE as a,j as s,m as l,H as n,I as r,O as o,M as i,a6 as c,L as d,F as p,ab as m,u,Z as h,a9 as f,d as v,U as b,P as g,G as x,X as _,V as k,_ as y,c as B}from"./vue-vendor-DZekML78.js";import{a1 as j,a2 as I}from"./element-plus-DSMJnpwa.js";import{i as C,d as P}from"./index-mv7arXuk.js";const w={key:0,class:"no-redirect"},H=["onClick"],L=P(e({__name:"index",setup(e){const b=t(),g=a(),x=C(),_=v([]),k=()=>{let e=[];if(y(b.path)>2){const t=/\/\w+/gi,a=b.path.match(t).map((e,t)=>(0!==t&&(e=e.slice(1)),e));B(a,x.defaultRoutes,e)}else e=b.matched.filter(e=>e.meta&&e.meta.title);P(e[0])||(e=[{path:"/index",meta:{title:"首页"}}].concat(e)),_.value=e.filter(e=>e.meta&&e.meta.title&&!1!==e.meta.breadcrumb)},y=(e,t="/")=>"string"!=typeof e||0===e.length?0:e.split(t).length-1,B=(e,t,a)=>{const s=t.find(t=>t.path==e[0]||(t.name+="").toLowerCase()==e[0]);s&&(a.push(s),s.children&&e.length&&(e.shift(),B(e,s.children,a)))},P=e=>{const t=e&&e.name;return!!t&&"Index"===t.trim()};return s(()=>{b.path.startsWith("/redirect/")||k()}),l(()=>{k()}),(e,t)=>{const a=j,s=I;return n(),r(s,{class:"app-breadcrumb",separator:">"},{default:o(()=>[i(c,{name:"breadcrumb"},{default:o(()=>[(n(!0),d(p,null,m(u(_),(e,t)=>(n(),r(a,{key:e.path},{default:o(()=>["noRedirect"===e.redirect||t==u(_).length-1?(n(),d("span",w,h(e.meta?.title),1)):(n(),d("a",{key:1,onClick:f(t=>(e=>{const{redirect:t,path:a}=e;t?g.push(t):g.push(a)})(e),["prevent"])},h(e.meta?.title),9,H))]),_:2},1024))),128))]),_:1})]),_:1})}}}),[["__scopeId","data-v-77b492cd"]]),R={class:"PageHeaderBox"},$={class:"leftbox"},E={class:"pageTitleBox flex items-center"},F={class:"pagetitle"},G={class:"h-20px"},M={class:"rightbox"},O=e({name:"Pageheader"}),S=P(e({...O,props:{title:{type:String,default:""}},setup(e){const a=b(),s=B(()=>({content:a.content??null,operate:a.operate??null})),l=t(),r=e,o=B(()=>r.title?r.title:l.meta.title);return(e,t)=>(n(),d("div",R,[g("div",$,[i(L,{class:"breadcrumb-container"}),g("div",E,[t[0]||(t[0]=g("div",{class:"line"},null,-1)),g("div",F,h(u(o)),1)]),Boolean(u(s).content)?x(e.$slots,"content",{key:0},void 0,!0):_("",!0),k(g("div",G,null,512),[[y,!Boolean(u(s).content)]])]),g("div",M,[Boolean(u(s).operate)?x(e.$slots,"operate",{key:0},void 0,!0):_("",!0)])]))}}),[["__scopeId","data-v-649bd9a3"]]);export{S as _};
