import { Component, Input } from '@angular/core';

@Component({
  selector: 'app-icon',
  templateUrl: './icon.component.html',
  styleUrls: ['./icon.component.scss'],
})
export class IconComponent {
  // private constructor() {
  //   this.iconUrl = this.iconPrefix + this.icon + 'Damage.svg';
  // }
  @Input() public icon: string = '';
  @Input() public size: string = 'xs';
  @Input() public type: string = 'weapon';
  private weaponIconPrefix: string = 'assets/icons/damageIcons/';
  public iconUrl: string = '';

  ngOnChanges() {
    this.iconUrl = this.weaponIconPrefix + this.icon + '.svg';
  }
}
