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

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

  @Input() trait: Trait | undefined;

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