{"version":3,"file":"definition-v2.mjs","sources":["../../../../src/definition/v2/definition.ts"],"sourcesContent":["import { html, unsafeCSS, CSSResult, nothing,  type TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { appendStylesheet } from '../../core/utils';\nimport styles from './definition.scss?inline';\nimport slotStyles from './definition.slot.scss?inline';\nimport { BaseOrganism } from '../../base-organism/base-organism';\nimport '../../text-content';\n\n@customElement('pips-v2-definition')\nexport class DefinitionV2 extends BaseOrganism {\n  static override styles: CSSResult[] = [...BaseOrganism.styles, unsafeCSS(styles)];\n\n  @property({ type: String, reflect: true }) variant: '' | 'article' = '';\n\n  override connectedCallback(): void {\n    super.connectedCallback();\n\n    // Apply styles to slotted elements\n    appendStylesheet({\n      target: this,\n      styles: slotStyles,\n      name: `${this.tagName.toLowerCase()}-slot`\n    });\n  }\n\n  protected override renderContent(): TemplateResult | typeof nothing {\n    return this.variant === 'article'\n      ? html`\n          <div class=\"article-layout-container layout--full-width\">\n            <slot name=\"heading\"></slot>\n            <slot name=\"body\"></slot>\n          </div>\n        `\n      : html`\n          <div class=\"layout--half-width\">\n            <slot name=\"heading\"></slot>\n          </div>\n          <div class=\"layout--half-width\">\n            <slot name=\"body\"></slot>\n          </div>\n        `;\n  }\n}\n"],"names":["DefinitionV2","BaseOrganism","constructor","super","arguments","this","variant","connectedCallback","appendStylesheet","target","styles","name","tagName","toLowerCase","renderContent","html","unsafeCSS","__decorateClass","property","type","String","reflect","prototype","customElement"],"mappings":"q1CASO,IAAMA,EAAN,cAA2BC,CAAAA,CAA3B,aAAAC,CAAAC,SAAAC,SAAAA,EAGsCC,KAAAC,QAA0B,EAAA,CAE5D,mBAAAC,CACPJ,MAAMI,kBAAAA,EAGNC,EAAiB,CACfC,OAAQJ,KACRK,6iCACAC,KAAM,GAAGN,KAAKO,QAAQC,YAAAA,CAAAA,OAAAA,CAAAA,CAE1B,CAEmB,eAAAC,CACjB,OAAOT,KAAKC,UAAY,UACpBS;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,UAMAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,SAQN,CAAA,EAhCWf,EACKU,OAAsB,CAAA,GAAIT,EAAaS,OAAQM,yUAEpBC,EAAA,CAA1CC,EAAS,CAAEC,KAAMC,OAAQC,QAAAA,EAAS,CAAA,CAAA,EAHxBrB,EAGgCsB,UAAA,UAAA,CAAA,EAHhCtB,EAANiB,EAAA,CADNM,EAAc,oBAAA,CAAA,EACFvB,CAAAA"}