import { Component } from '@angular/core';
import { MatIconRegistry } from '@angular/material/icon';
import { DomSanitizer } from '@angular/platform-browser';

@Component({
  selector: 'app-footer',
  templateUrl: './footer.component.html',
  styleUrl: './footer.component.css'
})
export class FooterComponent {
  year = 0;
  constructor(
    private _matIconRegistry: MatIconRegistry, 
    private _domSanitizer: DomSanitizer
  ){
    this.functAddSVGIcon();
    this.GetYear();
  }

  functAddSVGIcon(){
    this._matIconRegistry.addSvgIcon(
      'correo',
      this._domSanitizer.bypassSecurityTrustResourceUrl(`assets/img/correo.svg`)
    );
  }

  GetYear(){
    let today = new Date();
    this.year = today.getFullYear();
  }
}
