import{g as _,h as f,i as d,H as k,o as r,c as m,F as g,r as x,I as h,b as y,w as b,d as C,t as B,m as w,l as I,e as N,G as F}from"./BrnsOgRk.js";const j=_({__name:"Breadcrumbs",props:{center:{type:Boolean}},async setup(V){let s,l;const p=([s,l]=f(()=>d().fetchMenus()),s=await s,l(),s).main,u=k().path;function c(){const e=[{link:"Forside",path:"/"}],a=p.items.find(t=>u===t.path);if(a)e.push({link:a.link,path:a.path});else for(const t of p.items)if(t.children){const n=t.children.find(o=>u.startsWith(o.path));if(n){e.push({link:t.link,path:t.path}),e.push({link:n.link,path:n.path});break}}return e}return(e,a)=>{const t=N,n=F;return r(),m("ul",{class:h(["flex items-center gap-1 text-sm",{"justify-center":e.center}])},[(r(!0),m(g,null,x(c(),(o,i)=>(r(),m("li",{key:i,class:h(["flex items-center gap-1 text-gray-600",{"font-medium text-gray-950":i===c().length-1}])},[y(t,{to:o.path},{default:b(()=>[C(B(o.link),1)]),_:2},1032,["to"]),i!==c().length-1?(r(),w(n,{key:0,name:"material-symbols:chevron-right",size:"16"})):I("",!0)],2))),128))],2)}}});export{j as _};
