import{r as i,c as a,h as r,g as e}from"./p-52e3bb32.js";import{l as t}from"./p-e3d2e899.js";import{r as n}from"./p-ffe5c0e8.js";import{_ as d}from"./p-08cf2c0e.js";const o=class{constructor(r){i(this,r),this.afOnClick=a(this,"afOnClick",7),this.linkItems=[],this.currentPage=void 0,this.afAriaLabel=d.breadcrumbs,this.afId=n("digi-navigation-breadcrumbs"),this.afCurrentPage=void 0}onAfCurrentPage(i){this.currentPage=i}componentDidLoad(){this.getBreadcrumbs()}getBreadcrumbs(){const i=this._observer.children;!i||(null==i?void 0:i.length)<=0?t.warn("The slot contains no link elements.",this.hostElement):this.linkItems=[...i].filter((i=>"a"===i.tagName.toLowerCase())).map((i=>({text:i.textContent,href:i.getAttribute("href")||""})))}clickHandler(i){this.afOnClick.emit(i)}render(){var i;return r("nav",{key:"2eb7edfb17175dbbb23060e1ef082c26cc7ec00c",class:"digi-navigation-breadcrumbs","aria-label":this.afAriaLabel},r("ol",{key:"c3324fc686e3399ee2d1a62b4a81704c35d0dd0f",class:"digi-navigation-breadcrumbs__items"},this.linkItems.map((i=>r("li",{class:"digi-navigation-breadcrumbs__item"},r("a",{class:"digi-navigation-breadcrumbs__link",onClick:i=>this.clickHandler(i),href:i.href},i.text)))),r("li",{key:"b201285474d818da3a92c5182afe8d468cc9bb8e",class:"digi-navigation-breadcrumbs__item","aria-current":"page"},null!==(i=this.currentPage)&&void 0!==i?i:this.afCurrentPage),r("digi-util-mutation-observer",{key:"5fed828c087cb38c8e428f8343403f388d9c21c1",onAfOnChange:()=>this.getBreadcrumbs(),ref:i=>this._observer=i,hidden:!0},r("slot",{key:"beb32e05a1727e010ad5b169d6d335294ec4351b"}))))}get hostElement(){return e(this)}static get watchers(){return{afCurrentPage:["onAfCurrentPage"]}}};o.style='.sc-digi-navigation-breadcrumbs-h{--digi--navigation-breadcrumbs--items--display:flex;--digi--navigation-breadcrumbs--items--flex-wrap:wrap;--digi--navigation-breadcrumbs--items--padding:0;--digi--navigation-breadcrumbs--items--margin:0;--digi--navigation-breadcrumbs--item--font-family:var(--digi--global--typography--font-family--default);--digi--navigation-breadcrumbs--item--font-size:var(--digi--typography--breadcrumbs--font-size--desktop);--digi--navigation-breadcrumbs--item--text-decoration:var(--digi--typography--breadcrumbs--text-decoration--desktop);--digi--navigation-breadcrumbs--item--color:var(--digi--color--text--primary);--digi--navigation-breadcrumbs--divider--padding:var(--digi--gutter--icon);--digi--navigation-breadcrumbs--link--visited--color:var(--digi--color--text--interactive--primary);--digi--navigation-breadcrumbs--link--hover--focus--color:var(--digi--color--text--interactive--primary);--digi--navigation-breadcrumbs--link--hover--text-decoration:underline;--digi--navigation-breadcrumbs--link--hover--text-decoration-thickness:var(--digi--typography--text-decoration-thickness--hover);--digi--navigation-breadcrumbs--link--color:var(--digi--color--text--interactive--primary)}.sc-digi-navigation-breadcrumbs-h .digi-navigation-breadcrumbs__items.sc-digi-navigation-breadcrumbs{list-style:none;display:var(--digi--navigation-breadcrumbs--items--display);flex-wrap:var(--digi--navigation-breadcrumbs--items--flex-wrap);margin:var(--digi--navigation-breadcrumbs--items--margin);padding:var(--digi--navigation-breadcrumbs--items--padding)}.sc-digi-navigation-breadcrumbs-h .digi-navigation-breadcrumbs__item.sc-digi-navigation-breadcrumbs{font-family:var(--digi--navigation-breadcrumbs--item--font-family);font-size:var(--digi--navigation-breadcrumbs--item--font-size);color:var(--digi--navigation-breadcrumbs--item--color);width:unset;margin-bottom:unset}.sc-digi-navigation-breadcrumbs-h .digi-navigation-breadcrumbs__item.sc-digi-navigation-breadcrumbs:not([aria-current=page])::after{content:"/";padding-inline:var(--digi--navigation-breadcrumbs--divider--padding)}.sc-digi-navigation-breadcrumbs-h .digi-navigation-breadcrumbs__link.sc-digi-navigation-breadcrumbs{color:var(--digi--navigation-breadcrumbs--link--color);font-size:var(--digi--navigation-breadcrumbs--item--font-size)}.sc-digi-navigation-breadcrumbs-h .digi-navigation-breadcrumbs__link.sc-digi-navigation-breadcrumbs:visited{color:var(--digi--navigation-breadcrumbs--link--color)}.sc-digi-navigation-breadcrumbs-h .digi-navigation-breadcrumbs__link.sc-digi-navigation-breadcrumbs:hover{text-decoration:var(--digi--navigation-breadcrumbs--link--hover--text-decoration);text-decoration-thickness:var(--digi--navigation-breadcrumbs--link--hover--text-decoration-thickness)}.sc-digi-navigation-breadcrumbs-h .digi-navigation-breadcrumbs__link.sc-digi-navigation-breadcrumbs:focus-visible{outline:2px solid black;outline-offset:2px;box-shadow:0px 0px 0px 5px white}';export{o as digi_navigation_breadcrumbs}