import { Component, EventEmitter, Input, Output, ChangeDetectionStrategy } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'app-patient-dashboard-tabs',
  standalone: true,
  imports: [CommonModule],
  templateUrl: './patient-dashboard-tabs.component.html',
  styleUrls: ['./patient-dashboard-tabs.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class PatientDashboardTabsComponent {
  @Input() activeTab: string = 'overview';
  @Input() totalAppointments = 0;
  @Input() doctorsCount = 0;
  @Input() prescriptionsCount = 0;

  @Output() tabChange = new EventEmitter<string>();

  selectTab(tab: string): void {
    if (this.activeTab === tab) {
      return;
    }
    this.tabChange.emit(tab);
  }
}

