import { Component, Input } from '@angular/core';
import { DetailsService } from 'src/services/details/details.service';
import { Ability } from 'src/interfaces/interfaces';

@Component({
  selector: 'app-ability-details',
  templateUrl: './ability-details.component.html',
  styleUrls: ['./ability-details.component.scss'],
})
export class AbilityDetailsComponent {
  public constructor(public detailsAccessor: DetailsService) {}

  @Input() ability: Ability | undefined;

  public close(result: string): void {
    this.detailsAccessor.closePanel(result);
  }
}
