import { h } from "@stencil/core"; export class Breadcrumb { componentDidLoad() { const element = this.el.shadowRoot.firstChild; this.addEventListenersToHandleCustomFocusState(element); } addEventListenersToHandleCustomFocusState(element) { if (!element) { console.error('element not found'); return; } element.tabIndex = -1; const slot = element.querySelector('slot'); if (slot) { const assignedNodes = slot.assignedNodes(); for (let i = 0; i < assignedNodes.length; i++) { const node = assignedNodes[i]; if (node.nodeName === 'IFX-BREADCRUMB-ITEM') { const breadcrumbLabel = node; if (!breadcrumbLabel.hasAttribute('url')) { breadcrumbLabel.tabIndex = -1; breadcrumbLabel.addEventListener('focus', () => { if (breadcrumbLabel.hasAttribute('url')) { breadcrumbLabel.blur(); } }); } } } } } render() { return (h("nav", { "aria-label": "Page navigation breadcrumb" }, h("ol", { class: "breadcrumb" }, h("slot", null)))); } static get is() { return "ifx-breadcrumb"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["breadcrumb.scss"] }; } static get styleUrls() { return { "$": ["breadcrumb.css"] }; } static get elementRef() { return "el"; } } //# sourceMappingURL=breadcrumb.js.map