{"version":3,"file":"breadcrumb-item.COYY4GTy.js","sources":["../../../../../packages/web-components/src/lib/components/breadcrumb-item/breadcrumb-item.ts"],"sourcesContent":["import { html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { pdsCustomElement as customElement } from '../../decorators/pds-custom-element';\nimport { PdsElement } from '../PdsElement';\nimport styles from './breadcrumb-item.scss?inline';\nimport '@principal/design-system-icons-web/chevron-right';\nimport '@principal/design-system-icons-web/chevron-left';\nimport { requiredSlot } from '../../decorators/requiredSlot';\n\n/**\n * @summary A breadcrumb-item (li) element\n *\n * @slot default Required: The content of the breadcrumb item\n *\n * @fires pds-breadcrumb-item-click A custom event dispatched on click\n */\n\n@customElement('pds-breadcrumb-item', {\n category: 'component',\n type: 'component',\n state: 'stable',\n styles,\n})\nexport class PdsBreadcrumbItem extends PdsElement {\n /**\n * - Active denotes current breadcrumb-item rendering it non-clickable.\n */\n @property({ type: Boolean })\n active = false;\n\n /**\n * - href supplies the url for the breadcrumb link\n */\n @property({ type: String })\n href = '#';\n\n /**\n * @internal\n */\n handleClick(e: MouseEvent) {\n const customEvent = new CustomEvent('pds-breadcrumb-item-click', {\n bubbles: true,\n composed: true,\n cancelable: true,\n detail: {\n summary: this.textContent,\n },\n });\n\n this.dispatchEvent(customEvent);\n\n if (customEvent.defaultPrevented) {\n e.preventDefault();\n }\n }\n\n /**\n * @internal\n */\n getBreadcrumb(): unknown {\n if (this.active) {\n return html`Breadcrumb`;\n }\n\n return html`Breadcrumb`;\n }\n\n /**\n * @internal\n */\n get classNames() {\n return {\n active: this.active,\n };\n }\n\n @requiredSlot(['default'])\n render() {\n return html`
  • \n ${this.getBreadcrumb()}\n
  • `;\n }\n}\n"],"names":["PdsBreadcrumbItem","PdsElement","e","customEvent","html","__decorateClass","property","requiredSlot","customElement","styles"],"mappings":";;;;;;;;;;AAuBa,IAAAA,IAAN,cAAgCC,EAAW;AAAA,EAA3C,cAAA;AAAA,UAAA,GAAA,SAAA,GAKI,KAAA,SAAA,I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