import type { IOutOfOfficeData } from "@calcom/core/getUserAvailability";
import type { Dayjs } from '../dayjs';
import dayjs from '../dayjs';
import type { Availability } from '../prisma/client';
export type DateRange = {
    start: Dayjs;
    end: Dayjs;
};
export type DateOverride = Pick<Availability, "date" | "startTime" | "endTime">;
export type WorkingHours = Pick<Availability, "days" | "startTime" | "endTime">;
type TravelSchedule = {
    startDate: Dayjs;
    endDate?: Dayjs;
    timeZone: string;
};
export declare function processWorkingHours({ item, timeZone, dateFrom, dateTo, travelSchedules, }: {
    item: WorkingHours;
    timeZone: string;
    dateFrom: Dayjs;
    dateTo: Dayjs;
    travelSchedules: TravelSchedule[];
}): {
    start: dayjs.Dayjs;
    end: dayjs.Dayjs;
}[];
export declare function processDateOverride({ item, itemDateAsUtc, timeZone, travelSchedules, }: {
    item: DateOverride;
    itemDateAsUtc: Dayjs;
    timeZone: string;
    travelSchedules: TravelSchedule[];
}): {
    start: dayjs.Dayjs;
    end: dayjs.Dayjs;
};
export declare function buildDateRanges({ availability, timeZone, dateFrom, dateTo, travelSchedules, outOfOffice, }: {
    timeZone: string;
    availability: (DateOverride | WorkingHours)[];
    dateFrom: Dayjs;
    dateTo: Dayjs;
    travelSchedules: TravelSchedule[];
    outOfOffice?: IOutOfOfficeData;
}): {
    dateRanges: DateRange[];
    oooExcludedDateRanges: DateRange[];
};
export declare function groupByDate(ranges: DateRange[]): {
    [x: string]: DateRange[];
};
export declare function intersect(ranges: DateRange[][]): DateRange[];
export declare function subtract(sourceRanges: (DateRange & {
    [x: string]: unknown;
})[], excludedRanges: DateRange[]): DateRange[];
export declare function mergeOverlappingRanges(ranges: {
    start: Date;
    end: Date;
}[]): {
    start: Date;
    end: Date;
}[];
export {};
//# sourceMappingURL=date-ranges.d.ts.map