UNPKG

@hashicorp/design-system-components

Version:
55 lines (52 loc) 2.03 kB
import Component from '@glimmer/component'; import { hash } from '@ember/helper'; import { service } from '@ember/service'; import HdsAppFooterCopyright from './copyright.js'; import HdsYield from '../yield/index.js'; import HdsAppFooterStatusLink from './status-link.js'; import HdsAppFooterLegalLinks from './legal-links.js'; import HdsAppFooterLink from './link.js'; import HdsAppFooterItem from './item.js'; import { precompileTemplate } from '@ember/template-compilation'; import { setComponentTemplate } from '@ember/component'; import { g, i } from 'decorator-transforms/runtime'; /** * Copyright IBM Corp. 2021, 2025 * SPDX-License-Identifier: MPL-2.0 */ class HdsAppFooter extends Component { static { g(this.prototype, "hdsIntl", [service]); } #hdsIntl = (i(this, "hdsIntl"), void 0); get ariaLabel() { return this.args.ariaLabel ?? this.hdsIntl.t('hds.components.app-footer.list.aria-label', { default: 'Footer items' }); } get theme() { return this.args.theme ?? 'light'; } get classNames() { const classes = ['hds-app-footer']; // add a class based on the @theme argument classes.push(`hds-app-footer--theme-${this.theme}`); return classes.join(' '); } static { setComponentTemplate(precompileTemplate("<div class={{this.classNames}} ...attributes>\n {{yield (hash ExtraBefore=HdsYield)}}\n <ul class=\"hds-app-footer__list\" aria-label={{this.ariaLabel}}>\n {{yield (hash StatusLink=HdsAppFooterStatusLink)}}\n {{yield (hash Link=HdsAppFooterLink LegalLinks=HdsAppFooterLegalLinks Item=HdsAppFooterItem)}}\n </ul>\n {{yield (hash ExtraAfter=HdsYield)}}\n <HdsAppFooterCopyright @year={{@copyrightYear}} />\n</div>", { strictMode: true, scope: () => ({ hash, HdsYield, HdsAppFooterStatusLink, HdsAppFooterLink, HdsAppFooterLegalLinks, HdsAppFooterItem, HdsAppFooterCopyright }) }), this); } } export { HdsAppFooter as default }; //# sourceMappingURL=index.js.map