{"version":3,"file":"odx-angular-components-footer.mjs","sources":["../../../../libs/angular/components/footer/src/lib/footer.i18n.ts","../../../../libs/angular/components/footer/src/lib/footer.config.ts","../../../../libs/angular/components/footer/src/lib/helpers/create-footer-links.ts","../../../../libs/angular/components/footer/src/lib/models/footer-variant.ts","../../../../libs/angular/components/footer/src/lib/footer.component.ts","../../../../libs/angular/components/footer/src/lib/footer.component.html","../../../../libs/angular/components/footer/src/odx-angular-components-footer.ts"],"sourcesContent":["import { TranslationObject } from '@odx/angular/internal/translate';\n\nexport default {\n  en: {\n    legalNotice: 'Legal notice',\n    providerIdentification: 'Provider identification',\n    dataProtection: 'Data protection',\n    openSource: 'Open-source licenses',\n    termsAndConditions: 'Terms and Conditions',\n    status: 'Status',\n  },\n  de: {\n    legalNotice: 'Rechtliche Hinweise',\n    providerIdentification: 'Impressum',\n    dataProtection: 'Datenschutz',\n    openSource: 'Open-Source-Lizenzen',\n    termsAndConditions: 'Allgemeine Geschäftsbedingungen',\n    status: 'Status',\n  },\n} as TranslationObject;\n","import { MainMenuLinksConfig } from '@odx/angular/components/main-menu';\nimport { buildWebsiteUrl, createConfigTokens } from '@odx/angular/utils';\nimport { Observable } from 'rxjs';\nimport { FooterLink } from './models';\n\nexport interface FooterLinksConfig extends MainMenuLinksConfig {\n  dynamicLinks?: Observable<FooterLink[]>;\n}\n\n/**\n * Creates configuration tokens for the footer links, providing a structured way to inject and manage footer link configurations.\n * This utility function encapsulates the configuration for footer links, including defaults and the ability to inject custom configurations.\n *\n * @returns {Object} An object containing configuration tokens for footer links:\n * - `FooterLinksConfig`: A token for injecting the footer links configuration.\n * - `FooterLinksDefaultConfig`: A token representing the default configuration values.\n * - `injectFooterLinksConfig`: A function to inject the current footer links configuration.\n * - `provideFooterLinksConfig`: A function to provide a custom configuration for footer links.\n *\n * @example\n * ```ts\n * // In your module or component\n * @NgModule({\n *   providers: [\n *     provideFooterLinksConfig({\n *       legalNoticeUrl: 'https://www.custom-url/legal-notice',\n *       providerIdentificationUrl: 'https://www.custom-url/provider-identification',\n *       dynamicLinks: myDynamicLinksObservable\n *     })\n *   ]\n * })\n * export class MyModule {}\n * ```\n */\nexport const { FooterLinksConfig, FooterLinksDefaultConfig, injectFooterLinksConfig, provideFooterLinksConfig } = createConfigTokens(\n  'FooterLinks',\n  '@odx/angular/components/footer',\n  {\n    providerIdentificationUrl: buildWebsiteUrl('provideridentification'),\n    legalNoticeUrl: buildWebsiteUrl('legalnotice'),\n  } as FooterLinksConfig,\n);\n","import { Observable, combineLatest, map, of } from 'rxjs';\nimport { injectFooterLinksConfig } from '../footer.config';\nimport { FooterLink } from '../models';\n\n/**\n * Creates an observable stream of footer links, combining statically configured links with dynamically provided ones.\n * It leverages the footer links configuration injected from `injectFooterLinksConfig` and optionally includes\n * dynamic links if provided. All links are filtered to include only those with a non-empty URL.\n *\n * @returns {Observable<FooterLink[]>} - An Observable that emits an array of `FooterLink` objects. Each `FooterLink`\n * contains a `name` and a `url`. The observable emits updates if the set of dynamic links changes.\n */\n\nexport function createFooterLinks$(): Observable<FooterLink[]> {\n  const { legalNoticeUrl, providerIdentificationUrl, dataProtectionUrl, openSourceUrl, termsAndConditionsUrl, statusUrl, dynamicLinks } =\n    injectFooterLinksConfig();\n  const dynamicLinks$ = dynamicLinks ?? of([]);\n  const links = [\n    { name: 'status', url: statusUrl },\n    { name: 'termsAndConditions', url: termsAndConditionsUrl },\n    { name: 'providerIdentification', url: providerIdentificationUrl },\n    { name: 'openSource', url: openSourceUrl },\n    { name: 'dataProtection', url: dataProtectionUrl },\n    { name: 'legalNotice', url: legalNoticeUrl },\n  ];\n\n  return combineLatest([dynamicLinks$, of(links)]).pipe(map((links) => links.flat().filter((link): link is FooterLink => !!link.url)));\n}\n","export type FooterVariant = (typeof FooterVariant)[keyof typeof FooterVariant];\n\nexport const FooterVariant = {\n  LIGHT: 'light',\n  DARK: 'dark',\n} as const;\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { DynamicTextContent, DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { LinkDirective } from '@odx/angular/components/link';\nimport { LogoDirective } from '@odx/angular/components/logo';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { TranslatePipe, provideTranslations } from '@odx/angular/internal/translate';\nimport { injectElement } from '@odx/angular/utils';\nimport footerTranslations from './footer.i18n';\nimport { createFooterLinks$ } from './helpers';\nimport { FooterVariant } from './models';\n\n/**\n * Represents the footer component of an application, dynamically generating links and supporting various styles.\n * This component integrates dynamic and static content for the footer, including a logo, navigational links, and a customizable description.\n */\n\n@CSSComponent('footer')\n@Component({\n  standalone: true,\n  selector: 'odx-footer',\n  imports: [LinkDirective, LogoDirective, DynamicViewDirective, CommonModule, TranslatePipe],\n  templateUrl: './footer.component.html',\n  providers: [provideTranslations(footerTranslations)],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n})\nexport class FooterComponent {\n  protected readonly footerLinks$ = createFooterLinks$();\n  public readonly element = injectElement();\n\n  /**\n   * The description of the footer component.\n   * It can be of type DynamicTextContent or null.\n   *\n   * @type {DynamicTextContent}\n   * @default null\n   */\n  @Input()\n  public description?: DynamicTextContent | null = null;\n\n  /**\n   * The variant of the footer component.\n   *\n   * @type {FooterVariant}\n   * @default FooterVariant.LIGHT\n   */\n  @CSSModifier()\n  @Input()\n  public variant: FooterVariant = FooterVariant.LIGHT;\n}\n","<div class=\"odx-footer__inner\">\n  <div class=\"odx-footer__content\">\n    <ng-content />\n  </div>\n  <nav class=\"odx-footer__navigation\">\n    <ng-content select=\"[odxLink]\" />\n    @for (link of footerLinks$ | async; track $index) {\n      <a odxLink [href]=\"link.url\" target=\"_blank\">\n        {{ link.name | odxTranslate | async }}\n      </a>\n    }\n  </nav>\n  @if (description) {\n    <p class=\"odx-footer__description\">\n      <ng-template [odxDynamicView]=\"description\" />\n    </p>\n  }\n</div>\n","/**\n * Generated bundle index.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