import { Incidence } from '../../infrastructure/constants/incidences';
import { TimeTrackingEmployeeStatus } from '../types/status';

interface DateRange {
    fromDate: string;
    toDate: string;
}

interface DepartmentFilter {
    departmentIds?: number[];
    excludeDepartmentIds?: number[];
}

interface SiteFilter {
    siteIds?: number[];
    excludeSiteIds?: number[];
}

interface UserFilter extends DepartmentFilter, SiteFilter {
    search?: string;
    userIds: number[];
    itemIds: number[];
}

export interface ScheduleCodeFilter {
    scheduleCodes?: string[];
    excludeScheduleCodes?: string[];
}

export interface ScheduleFilter extends ScheduleCodeFilter {
    hasSchedule?: boolean;
    onlyNoSchedule?: boolean;
}

export interface Pagination {
    limit?: number;
    offset?: number;
}

export interface TimeTrackingDaySummaryFilters extends DateRange, UserFilter, ScheduleFilter {
    status: TimeTrackingEmployeeStatus[];
    incidences: Incidence[];
    hasHolidays: boolean;
    hasTimeOff: boolean;
    includeDeactivated?: boolean;
}

export interface TimeTrackingDaySummaryWithInstanceFilters extends TimeTrackingDaySummaryFilters {
    instanceId: number;
    timezone: string;
}

export interface TimeTrackingDaySummaryReportFilters extends TimeTrackingDaySummaryFilters {
    userFields: string[];
    groupIds?: number[];
    userCustomFields?: string[];
    hourCategoryIds?: number[];
    includeScheduledTime: boolean;
    includeClockInOut: boolean;
    includeAutoCloseIncidence: boolean;
    includeKiosk: boolean;
}

export interface TimeTrackingDaySummaryFiltersWithPagination extends TimeTrackingDaySummaryFilters, Pagination {}
