import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { ChartsModule, SeriesLabelsContentArgs } from '@progress/kendo-angular-charts';
import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
import { ListViewModule } from '@progress/kendo-angular-listview';
import { BadgeAlign, IndicatorsModule } from '@progress/kendo-angular-indicators';
import { ButtonsModule } from '@progress/kendo-angular-buttons';
import { IconsModule } from '@progress/kendo-angular-icons';
import { LayoutModule } from '@progress/kendo-angular-layout';
import { SVGIcon, envelopeIcon } from '@progress/kendo-svg-icons';
import {
  appointments,
  averageStay,
  compactCards,
  departments,
  donutData,
  heatmapDataCDC,
  heatmapDataCampylobacteriosis,
  heatmapDataHepatitis,
  heatmapDataInfluenza,
  heatmapDataMeasles,
  heatmapDataRSV,
  hospitalVisits,
  hours,
  listItems,
  mortalityCauses,
  satisfaction
} from './models';

@Component({
  selector: 'app-dashboard',
  standalone: true,
  imports: [
    CommonModule,
    FormsModule,
    ChartsModule,
    DateInputsModule,
    DropDownsModule,
    ListViewModule,
    IndicatorsModule,
    ButtonsModule,
    IconsModule,
    LayoutModule
  ],
  templateUrl: './dashboard.html',
  styleUrl: './dashboard.css'
})
export class Dashboard {
  public cardClasses = 'k-d-flex k-border k-border-solid k-border-border k-bg-surface-alt k-align-items-center k-overflow-x-auto k-p-3 k-gap-6 k-elevation-1 k-rounded-md';
  public dashboardClasses = 'k-d-flex k-flex-col k-border k-border-solid k-border-border k-bg-surface-alt k-overflow-x-auto k-elevation-1 k-rounded-md';

  public envelopeIcon: SVGIcon = envelopeIcon;

  public badgeAlignBottomEnd: BadgeAlign = {
    vertical: 'bottom',
    horizontal: 'end'
  };

  public chartLabelContent(e: SeriesLabelsContentArgs): string {
    return e.category;
  }

  public date = new Date(2023, 5, 14);
  public date2 = new Date(2023, 5, 15);
  public averageStay = averageStay;
  public hours = hours
  public hospitalVisits = hospitalVisits;
  public departments = departments;
  public mortalityCauses = mortalityCauses;
  public satisfaction = satisfaction;
  public donutData = donutData;
  public heatmapDataRSV = heatmapDataRSV;
  public heatmapDataCDC = heatmapDataCDC;
  public heatmapDataMeasles = heatmapDataMeasles;
  public heatmapDataInfluenza = heatmapDataInfluenza;
  public heatmapDataHepatitis = heatmapDataHepatitis
  public heatmapDataCampylobacteriosis = heatmapDataCampylobacteriosis;
  public heatmapData = (dataset: string): any[] => (this as any)[`heatmapData${dataset}`];
  public appointments = appointments;
  public ddlData = ['All Departments'];
  public ddlValue = 'All Departments'
  public compactCards = compactCards;
  public listItems: any[] = listItems;
}
