import { Component, OnInit, ContentChild, AfterContentInit, ViewChild, AfterViewInit, Input, Output, EventEmitter } from '@angular/core';
import { ApiService as ApiService } from '../../services/login-api';
import { FrontcraftItemSelectComponent } from './itemselector.component';
import { NbWindowService, NbWindowRef, NbToastrService, NbDialogService, NbDialogRef } from '@nebular/theme';
import { Item, Character, SRToken, Signup } from '../../../../../../backend/Types/Types';
import { getClassColor } from '../../../../../../backend/Types/PlayerSpecs';
import { _Tiers, allItems, Tiers } from '../../../../../../backend/Types/Items';

@Component({
    selector: 'item',
    template: `
        <span [ngStyle]="{'color':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(
      private toastr: NbToastrService,
      private api : ApiService
    ){}
  
    async ngOnInit() {
    }
  }