import { BasePort, ListOptions } from '@humand-packages/common';
import { UserDAO } from 'humand-packages/monolith/src/api/modules/users/infrastructure/dataAccessObjects/userDAO';
import { Instance } from '../../../instances/business/models/instance';
import { Site } from '../../../regions/business/models/site';
import { UserInterface } from '../../../users/business/models/userInterface';
import { UserListAllFilters } from '../../../users/business/types/listAllFilters';
import { TimeTrackingDaySummaryFiltersWithPagination } from '../interfaces/timeTrackingDaySummaryFilters';
import { EmployeeSummary } from '../models/employeeSummary';

export abstract class TimeTrackingEmployeePort extends BasePort {
    abstract listEmployeeSummaries(
        user: UserInterface,
        instance: Instance,
        reportFilters: TimeTrackingDaySummaryFiltersWithPagination,
        filterWithPolicies?: boolean,
        hasManageCapability?: boolean,
    ): Promise<{ count: number; rows: EmployeeSummary[]; sites: Map<number, Site> }>;

    abstract listEmployeeCalendars(
        user: UserInterface,
        instance: Instance,
        filter: TimeTrackingDaySummaryFiltersWithPagination,
    ): Promise<{ count: number; rows: EmployeeSummary[]; sites: Map<number, Site> }>;

    abstract listUsers(
        loggedUser: UserDAO | UserInterface,
        filters: UserListAllFilters,
        { pagination, sortingOptions }: ListOptions,
        hasManageCapability?: boolean,
    ): Promise<{ count: number; rows: UserDAO[] }>;
}
