import{b as f,d as c,u as _,m as k,p as C,s as E,o as s,v as u,r as y,n as t,e as r,i as w,j as P,t as S,x as $,a as d,w as x,g as j,A,_ as N,h as D,ae as K}from"./normalize-3ee1393a.js";import{i as T,_ as B,E as q}from"./base-c0bfa578.js";const g=Symbol("breadcrumbKey"),z=f({separator:{type:String,default:"/"},separatorIcon:{type:T}}),M=c({name:"ElBreadcrumb"}),O=c({...M,props:z,setup(l){const a=l,o=_("breadcrumb"),n=k();return C(g,a),E(()=>{const e=n.value.querySelectorAll(`.${o.e("item")}`);e.length&&e[e.length-1].setAttribute("aria-current","page")}),(e,m)=>(s(),u("div",{ref_key:"breadcrumb",ref:n,class:t(r(o).b()),"aria-label":"Breadcrumb",role:"navigation"},[y(e.$slots,"default")],2))}});var R=B(O,[["__file","/home/runner/work/element-plus/element-plus/packages/components/breadcrumb/src/breadcrumb.vue"]]);const V=f({to:{type:w([String,Object]),default:""},replace:{type:Boolean,default:!1}}),F=c({name:"ElBreadcrumbItem"}),G=c({...F,props:V,setup(l){const a=l,o=N(),n=P(g,void 0),e=_("breadcrumb"),{separator:m,separatorIcon:i}=S(n),p=o.appContext.config.globalProperties.$router,v=k(),I=()=>{!a.to||!p||(a.replace?p.replace(a.to):p.push(a.to))};return(b,H)=>(s(),u("span",{class:t(r(e).e("item"))},[$("span",{ref_key:"link",ref:v,class:t([r(e).e("inner"),r(e).is("link",!!b.to)]),role:"link",onClick:I},[y(b.$slots,"default")],2),r(i)?(s(),d(r(q),{key:0,class:t(r(e).e("separator"))},{default:x(()=>[(s(),d(j(r(i))))]),_:1},8,["class"])):(s(),u("span",{key:1,class:t(r(e).e("separator")),role:"presentation"},A(r(m)),3))],2))}});var h=B(G,[["__file","/home/runner/work/element-plus/element-plus/packages/components/breadcrumb/src/breadcrumb-item.vue"]]);const Q=D(R,{BreadcrumbItem:h}),U=K(h);export{Q as E,U as a};
