import*as e from"lit";import*as r from"lit/decorators.js";import*as t from"lit/directives/if-defined.js";import*as a from"lit/directives/repeat.js";var s,o,i={3445(e,r,t){t.d(r,{Q:()=>a});var a,s=t(9609),o=t(4084),i=t(2927),n=t(8899),l=t(3517),p=t(2577),c=t(9485),d=function(e,r,t,a){var s,o=arguments.length,i=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,r,t,a);else for(var n=e.length-1;n>=0;n--)(s=e[n])&&(i=(o<3?s(i):o>3?s(r,t,i):s(r,t))||i);return o>3&&i&&Object.defineProperty(r,t,i),i};!function(e){let r=class extends i.LitElement{constructor(){super(...arguments),this.label="Breadcrumb",this.navCrumbs=[]}static get styles(){return[o.A,c.A]}setLastAnchorCurrent(){var e;(null===(e=this.anchors)||void 0===e?void 0:e.length)&&this.anchors[this.anchors.length-1].setAttribute("aria-current","page")}firstUpdated(e){super.firstUpdated(e),this.setLastAnchorCurrent()}update(e){super.update(e),e.has("navCrumbs")&&this.setLastAnchorCurrent()}handleClick(e){var r;const t=e.target;if(null===(r=this.anchors)||void 0===r?void 0:r.length){const e=Array.from(this.anchors).indexOf(t);-1!==e&&(this.navCrumbs=[...this.navCrumbs.splice(0,e+1)])}}render(){return i.html`
        <nav aria-label="${(0,l.ifDefined)(this.label?this.label:void 0)}" class="md-breadcrumb">
          <ul @click=${e=>this.handleClick(e)}>
            ${(0,p.repeat)(this.navCrumbs,e=>e.link,e=>i.html`
                <li>
                  <a href="${e.link}"> ${e.label} </a>
                </li>
              `)}
          </ul>
        </nav>
      `}};d([(0,n.property)({type:String,attribute:"aria-label"})],r.prototype,"label",void 0),d([(0,n.property)({type:Array,attribute:"nav-crumbs",reflect:!0})],r.prototype,"navCrumbs",void 0),d([(0,n.queryAll)("a[href]")],r.prototype,"anchors",void 0),r=d([(0,s.w)("md-breadcrumb")],r),e.ELEMENT=r}(a||(a={}))},2927(r,t,a){var s,o;r.exports=(s={LitElement:()=>e.LitElement,css:()=>e.css,html:()=>e.html},o={},a.d(o,s),o)},8899(e,t,a){var s,o;e.exports=(s={property:()=>r.property,queryAll:()=>r.queryAll},o={},a.d(o,s),o)},3517(e,r,a){var s,o;e.exports=(s={ifDefined:()=>t.ifDefined},o={},a.d(o,s),o)},2577(e,r,t){var s,o;e.exports=(s={repeat:()=>a.repeat},o={},t.d(o,s),o)}},n={};function l(e){var r=n[e];if(void 0!==r)return r.exports;var t=n[e]={exports:{}};return i[e](t,t.exports,l),t.exports}l.m=i,s=[],l.O=(e,r,t,a)=>{if(!r){var o=1/0;for(c=0;c<s.length;c++){for(var[r,t,a]=s[c],i=!0,n=0;n<r.length;n++)(!1&a||o>=a)&&Object.keys(l.O).every(e=>l.O[e](r[n]))?r.splice(n--,1):(i=!1,a<o&&(o=a));if(i){s.splice(c--,1);var p=t();void 0!==p&&(e=p)}}return e}a=a||0;for(var c=s.length;c>0&&s[c-1][2]>a;c--)s[c]=s[c-1];s[c]=[r,t,a]},l.d=(e,r)=>{for(var t in r)l.o(r,t)&&!l.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},l.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);export{l as __webpack_require__};o={555:0,6060:0},l.C=e=>{var r,t,{__webpack_esm_ids__:a,__webpack_esm_modules__:s,__webpack_esm_runtime__:i}=e,n=0;for(r in s)l.o(s,r)&&(l.m[r]=s[r]);for(i&&i(l);n<a.length;n++)t=a[n],l.o(o,t)&&o[t]&&o[t][0](),o[a[n]]=0;l.O()},l.O.j=e=>0===o[e];import*as p from"../9609.js";l.C(p);import*as c from"../4084.js";l.C(c);import*as d from"../9485.js";l.C(d);var f=l.O(void 0,[9609,4084,9485],()=>l(3445));const u=(f=l.O(f)).Q;export{u as Breadcrumb};