"use strict";(self.webpackChunk_surecart_blocks_next=self.webpackChunk_surecart_blocks_next||[]).push([[2116],{2116:function(e,a,r){r.r(a),r.d(a,{sc_breadcrumbs:function(){return c}});var t=r(6892);const c=class{constructor(e){(0,t.r)(this,e),this.label="Breadcrumb"}getSeparator(){const e=this.el.shadowRoot.querySelector("slot[name=separator]").assignedElements({flatten:!0})[0].cloneNode(!0);return[e,...e.querySelectorAll("[id]")].forEach((e=>e.removeAttribute("id"))),e.slot="separator",e}handleSlotChange(){const e=this.el.shadowRoot.querySelector(".breadcrumb slot").assignedElements().filter((e=>"CE-BREADCRUMB"===e.nodeName));e.forEach(((a,r)=>{null===a.querySelector('[slot="separator"]')&&a.append(this.getSeparator()),r===e.length-1?a.setAttribute("aria-current","page"):a.removeAttribute("aria-current")}))}render(){return(0,t.h)(t.F,{key:"2c3f669d33e1cd9d81584741f854714b527d748a"},(0,t.h)("nav",{key:"70bf38c356ae9a9727e199abb069135ead181604",part:"base",class:"breadcrumb","aria-label":this.label},(0,t.h)("slot",{key:"59ce0523c1c3afc196acf714f683d0f75ce9ca4f",onSlotchange:()=>this.handleSlotChange()})),(0,t.h)("div",{key:"2211bd7d39b79ca41ddeb74a6882231a8974c9ac",part:"separator",hidden:!0,"aria-hidden":"true"},(0,t.h)("slot",{key:"58f17b11abbc7bdda157877bbcd24cf7585588ee",name:"separator"},(0,t.h)("sc-icon",{key:"dd97d312976ccafa8c95305326abd4f13bcdd9a8",name:"chevron-right"}))))}get el(){return(0,t.a)(this)}};c.style=":host{display:block}.breadcrumb{display:flex;align-items:center;flex-wrap:wrap}"}}]);