import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';
import { TabSelectionOptions, TabSelectionOption } from './tab-selection-options.model';

@Component({
  selector: 'app-tab-selection',
  templateUrl: './tab-selection.component.html',
  styleUrls: ['./tab-selection.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TabSelectionComponent {
  @Input() tabs: TabSelectionOptions;
  @Output() toggle = new EventEmitter<TabSelectionOption>();

  constructor() {}

  onClick(tab: TabSelectionOption) {
    this.toggle.emit(tab);
  }
}
