import { Component } from '@angular/core';
import { ConfigService } from 'src/app/service/config.service';
import { VersionService } from 'src/app/service/version.service';
import { ToastService } from 'src/app/service/toast.service';

@Component({
  selector: 'app-footer',
  templateUrl: './footer.component.html',
  styleUrls: ['./footer.component.scss'],
})
export class FooterComponent {
  webVersion = '0.0.0';
  apiVersion = '0.0.0';

  constructor(
    private toast: ToastService,
    private config: ConfigService,
    private version: VersionService
  ) {
    this.version.getApiVersion().subscribe(version => {
      this.apiVersion = version;
    });
    this.version.getWebVersion().subscribe(version => {
      this.webVersion = version.version;
    });
  }

  get termsUrl(): string {
    return this.config.settings.termsUrl;
  }

  get privacyUrl(): string {
    return this.config.settings.privacyURL;
  }

  get imprintUrl(): string {
    return this.config.settings.imprintURL;
  }
}
