import { Component, OnInit, Input, } from '@angular/core';
import { Item, } from '../../../../../../backend/Types/Types';
import { _Tiers, } from '../../../../../../backend/Types/Items';

@Component({
  selector: 'item',
  template: `
      <span 
            [ngStyle]="{'color':item.quality=='Poor'?'#9d9d9d':
                                item.quality=='Common'?'#FFFFFF':
                                item.quality=='Uncommon'?'#1eff00':
                                item.quality=='Rare'?'#0070dd':
                                item.quality=='Epic'?'#a335ee':
                                '#ff8000'}">
          <img style="min-width: 20px; width: 2.25vw; max-width: 35px" 
          [src]="'https://wow.zamimg.com/images/wow/icons/large/'+item.iconname+'.jpg'" />
          &nbsp;
          {{item.itemname}}
      </span>
    `,
})
export class FrontcraftItemComponent implements OnInit {
  @Input() item: Item

  constructor(
  ) { }

  async ngOnInit() {
  }
}