import { ChangeDetectionStrategy, Component, Inject, Input } from '@angular/core';
import { I18NService } from '../../../core/i18n/service';
import { BIXI_I18N_TOKEN } from '../../../core/i18n/service.type';

@Component({
  selector: 'app-footer',
  templateUrl: './footer.component.html',
  host: {
    '[class.footer]': 'true',
    '[class.footer__dark]': 'true',
    '[class.footer__small]': 'small'
  },
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class FooterComponent {
  color = `#007cfe`;
  lessLoaded = false;

  @Input() small = false;

  footerList = [
    {
      title: 'app.footer.resource.center',
      cls: 'bixi-resource',
      link: [
        { title: '@bixi/core', route: '' },
        { title: '@bixi/auth', route: `/auth/getting-started/${this.i18n.zone}` },
        { title: '@bixi/ac', route: `/ac/getting-started/${this.i18n.zone}` },
        { title: '@bixi/mock', route: `/mock/getting-started/${this.i18n.zone}` }
      ]
    },
    {
      title: 'app.footer.development.tool',
      cls: 'bixi-dev-tools',
      link: [{ title: '@bixi/cli', route: '' }]
    },
    {
      title: 'app.footer.community',
      cls: 'bixi-community',
      link: [
        { title: 'app.footer.change-log', route: `/docs/changelog/${this.i18n.zone}` },
        { title: 'app.footer.issues', href: `//git.datagrand.com/frontend_utils/bixi/issues` }
      ]
    },
    {
      title: 'app.footer.resources',
      cls: 'related-resources',
      link: [
        { title: 'Angular', href: '//www.angular.cn/' },
        { title: 'NG-ZORRO', href: '//ng.ant.design' }
      ]
    }
  ];
  constructor(@Inject(BIXI_I18N_TOKEN) public i18n: I18NService) { }
}
