{"version":3,"file":"avatar.Bl6AiujE.js","sources":["../../../../../packages/web-components/src/lib/components/avatar/avatar.ts"],"sourcesContent":["import { html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { pdsCustomElement as customElement } from '../../decorators/pds-custom-element';\nimport { PdsElement } from '../PdsElement';\nimport styles from './avatar.scss?inline';\nimport '../decorator/decorator';\n\n/**\n * @summary An avatar image with descriptive text\n *\n * @slot media Required: Holds a div containing an avatar image or icon\n * @slot heading Required: Holds the heading elements\n * @slot details Optional: Holds the details elements\n */\n@customElement('pds-avatar', {\n category: 'component',\n type: 'component',\n state: 'stable',\n styles,\n})\nexport class PdsAvatar extends PdsElement {\n /**\n * Style variant\n * - **color-bar** not supported with inverted=\"true\" and/or align=\"center\"\n */\n @property()\n variant: 'color-bar' | 'default' = 'default';\n\n @property({ type: Boolean })\n inverted: boolean = false;\n\n @property()\n align: 'center' | 'default' = 'default';\n\n /**\n * @internal\n */\n preflight() {\n if (this.variant === 'color-bar' && this.align === 'center') {\n console.warn(\n 'Avatar with the color-bar variant cannot be used with align=center. Please remove the align property to remove this warning.',\n this,\n );\n }\n if (this.variant === 'color-bar' && this.inverted) {\n console.warn(\n 'Avatar with the color-bar variant cannot be used with the inverted property. Please remove the inverted property to remove this warning.',\n this,\n );\n }\n }\n\n /**\n * @internal\n *\n * @returns pds-decorator for color-bar variant\n */\n colorBarVariant() {\n if (\n this.variant === 'color-bar' &&\n this.align !== 'center' &&\n this.inverted === false\n ) {\n return html`