import { Component } from '@angular/core';
import { DataService } from 'src/services/data/data.service';
import { SpeciesService } from 'src/services/species/species.service';

@Component({
  selector: 'species',
  templateUrl: './species.component.html',
  styleUrl: './species.component.scss',
})
export class SpeciesComponent {
  species: any;
  speciesName: string = '';

  public constructor(
    public speciesAccessor: SpeciesService,
    public dataAccessor: DataService
  ) {
    this.speciesName = this.dataAccessor.characterData.race;
    this.species = speciesAccessor.getSpeciesDetails(this.speciesName);
  }
}
