import { Component, Input, OnInit } from "@angular/core";
import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";

import { Socials } from "../config/Socials";

/**
 *
 */
@Component({
  selector: "app-social",
  standalone: true,
  imports: [FontAwesomeModule],
  templateUrl: "./social.component.html",
  styleUrl: "./social.component.css"
})
export class SocialComponent implements OnInit {
  @Input() social: (typeof Socials)[number] = {} as never;
  public link = "";
  public label = "";
  public alt = "";
  public icon: IconDefinition = {} as never;

  /**
   *
   */
  ngOnInit(): void {
    this.link = this.social.link;
    this.label = this.social.label;
    this.alt = this.social.alt;
    this.icon = this.social.icon;
  }
}
