import dayjs from 'dayjs';
import { Request } from 'express';
import { components } from '../../../types/api';
import { DateRangeFilterValue, DateRange, FilterValue } from '../../_filters/types';
import RelativeDateRange, { RelativeOption } from './types';
import { defaultFilterValue } from '../../../utils/Personalisation/types';
export declare const dateIsInBounds: (startDate: dayjs.Dayjs | string, endDate: dayjs.Dayjs | string, min: string, max: string) => boolean;
export declare const calcDates: (durationValue: string) => {
    endDate: string | dayjs.Dayjs;
    startDate: string | dayjs.Dayjs;
};
export declare const setValueFromRequest: (filter: DateRangeFilterValue, req: Request, prefix: string) => DateRangeFilterValue["value"];
export declare const setDefaultValue: (req: Request, name: string) => {
    value: DateRange;
    name: string;
};
export declare const setFilterValueFromDefault: (defaultValue: defaultFilterValue, filter: FilterValue) => {
    value: {
        start: string;
        end: string;
        relative: string;
    };
    min?: string;
    max?: string;
    relativeOptions?: {
        value: string;
        text: string;
        disabled?: boolean;
    }[];
    type: import("../../_filters/filter-input/enum").FilterType;
    name: string;
    text: string;
    mandatory?: boolean | undefined | undefined;
    index?: number | undefined | undefined;
} | {
    value: {
        start: string;
        end: string;
        relative: string;
    };
    minimumLength?: number | undefined;
    pattern?: string | undefined;
    text: string;
    name: string;
    type: import("../../_filters/filter-input/enum").FilterType;
    mandatory?: boolean | undefined;
    index?: number | undefined;
} | {
    value: {
        start: string;
        end: string;
        relative: string;
    };
    options: Array<import("../../_filters/types").FilterOption>;
    staticOptionNameValue?: string;
    dynamicResourceEndpoint?: string;
    text: string;
    name: string;
    type: import("../../_filters/filter-input/enum").FilterType;
    mandatory?: boolean | undefined;
    index?: number | undefined;
} | {
    value: {
        start: string;
        end: string;
        relative: string;
    };
    values: string[];
    type: import("../../_filters/filter-input/enum").FilterType;
    name: string;
    text: string;
    mandatory?: boolean | undefined | undefined;
    index?: number | undefined | undefined;
    options: Array<import("../../_filters/types").FilterOption>;
    staticOptionNameValue?: string;
    dynamicResourceEndpoint?: string;
} | {
    value: {
        start: string;
        end: string;
        relative: string;
    };
    min?: string;
    max?: string;
    type: import("../../_filters/filter-input/enum").FilterType;
    name: string;
    text: string;
    mandatory?: boolean | undefined | undefined;
    index?: number | undefined | undefined;
} | {
    value: {
        start: string;
        end: string;
        relative: string;
    };
    min?: string;
    max?: string;
    relativeOptions?: {
        value: string;
        text: string;
        disabled?: boolean;
    }[];
    quickFilterOptions?: {
        value: string;
        text: string;
        disabled?: boolean;
    }[];
    granularityOptions?: {
        value: string;
        text: string;
    }[];
    type: import("../../_filters/filter-input/enum").FilterType;
    name: string;
    text: string;
    mandatory?: boolean | undefined | undefined;
    index?: number | undefined | undefined;
};
export declare const getRelativeDateOptions: (min?: string, max?: string) => RelativeOption[];
export declare const mapRelativeValue: (value: RelativeDateRange) => string;
export declare const getRelativeValues: () => {
    value: string;
    text: string;
    disabled?: boolean;
}[];
export declare const getFilterFromDefinition: (filter: components["schemas"]["FilterDefinition"], filterData: FilterValue) => {
    min: string | undefined;
    max: string | undefined;
    relativeOptions: RelativeOption[];
    value: DateRange;
    type: import("../../_filters/filter-input/enum").FilterType;
    name: string;
    text: string;
    mandatory?: boolean | undefined | undefined;
    index?: number | undefined | undefined;
} | {
    min: string | undefined;
    max: string | undefined;
    relativeOptions: RelativeOption[];
    value: DateRange;
    minimumLength?: number | undefined;
    pattern?: string | undefined;
    text: string;
    name: string;
    type: import("../../_filters/filter-input/enum").FilterType;
    mandatory?: boolean | undefined;
    index?: number | undefined;
} | {
    min: string | undefined;
    max: string | undefined;
    relativeOptions: RelativeOption[];
    value: DateRange;
    options: Array<import("../../_filters/types").FilterOption>;
    staticOptionNameValue?: string;
    dynamicResourceEndpoint?: string;
    text: string;
    name: string;
    type: import("../../_filters/filter-input/enum").FilterType;
    mandatory?: boolean | undefined;
    index?: number | undefined;
} | {
    min: string | undefined;
    max: string | undefined;
    relativeOptions: RelativeOption[];
    value: DateRange;
    values: string[];
    type: import("../../_filters/filter-input/enum").FilterType;
    name: string;
    text: string;
    mandatory?: boolean | undefined | undefined;
    index?: number | undefined | undefined;
    options: Array<import("../../_filters/types").FilterOption>;
    staticOptionNameValue?: string;
    dynamicResourceEndpoint?: string;
} | {
    min: string | undefined;
    max: string | undefined;
    relativeOptions: RelativeOption[];
    value: DateRange;
    type: import("../../_filters/filter-input/enum").FilterType;
    name: string;
    text: string;
    mandatory?: boolean | undefined | undefined;
    index?: number | undefined | undefined;
} | {
    min: string | undefined;
    max: string | undefined;
    relativeOptions: RelativeOption[];
    value: DateRange;
    quickFilterOptions?: {
        value: string;
        text: string;
        disabled?: boolean;
    }[];
    granularityOptions?: {
        value: string;
        text: string;
    }[];
    type: import("../../_filters/filter-input/enum").FilterType;
    name: string;
    text: string;
    mandatory?: boolean | undefined | undefined;
    index?: number | undefined | undefined;
};
export declare const getQueryFromDefinition: (filter: components["schemas"]["FilterDefinition"], name: string, filterPrefix: string) => string;
declare const _default: {
    calcDates: (durationValue: string) => {
        endDate: string | dayjs.Dayjs;
        startDate: string | dayjs.Dayjs;
    };
    getRelativeDateOptions: (min?: string, max?: string) => RelativeOption[];
    getFilterFromDefinition: (filter: components["schemas"]["FilterDefinition"], filterData: FilterValue) => {
        min: string | undefined;
        max: string | undefined;
        relativeOptions: RelativeOption[];
        value: DateRange;
        type: import("../../_filters/filter-input/enum").FilterType;
        name: string;
        text: string;
        mandatory?: boolean | undefined | undefined;
        index?: number | undefined | undefined;
    } | {
        min: string | undefined;
        max: string | undefined;
        relativeOptions: RelativeOption[];
        value: DateRange;
        minimumLength?: number | undefined;
        pattern?: string | undefined;
        text: string;
        name: string;
        type: import("../../_filters/filter-input/enum").FilterType;
        mandatory?: boolean | undefined;
        index?: number | undefined;
    } | {
        min: string | undefined;
        max: string | undefined;
        relativeOptions: RelativeOption[];
        value: DateRange;
        options: Array<import("../../_filters/types").FilterOption>;
        staticOptionNameValue?: string;
        dynamicResourceEndpoint?: string;
        text: string;
        name: string;
        type: import("../../_filters/filter-input/enum").FilterType;
        mandatory?: boolean | undefined;
        index?: number | undefined;
    } | {
        min: string | undefined;
        max: string | undefined;
        relativeOptions: RelativeOption[];
        value: DateRange;
        values: string[];
        type: import("../../_filters/filter-input/enum").FilterType;
        name: string;
        text: string;
        mandatory?: boolean | undefined | undefined;
        index?: number | undefined | undefined;
        options: Array<import("../../_filters/types").FilterOption>;
        staticOptionNameValue?: string;
        dynamicResourceEndpoint?: string;
    } | {
        min: string | undefined;
        max: string | undefined;
        relativeOptions: RelativeOption[];
        value: DateRange;
        type: import("../../_filters/filter-input/enum").FilterType;
        name: string;
        text: string;
        mandatory?: boolean | undefined | undefined;
        index?: number | undefined | undefined;
    } | {
        min: string | undefined;
        max: string | undefined;
        relativeOptions: RelativeOption[];
        value: DateRange;
        quickFilterOptions?: {
            value: string;
            text: string;
            disabled?: boolean;
        }[];
        granularityOptions?: {
            value: string;
            text: string;
        }[];
        type: import("../../_filters/filter-input/enum").FilterType;
        name: string;
        text: string;
        mandatory?: boolean | undefined | undefined;
        index?: number | undefined | undefined;
    };
    setValueFromRequest: (filter: DateRangeFilterValue, req: Request, prefix: string) => DateRangeFilterValue["value"];
    getQueryFromDefinition: (filter: components["schemas"]["FilterDefinition"], name: string, filterPrefix: string) => string;
    mapRelativeValue: (value: RelativeDateRange) => string;
    setDefaultValue: (req: Request, name: string) => {
        value: DateRange;
        name: string;
    };
    setFilterValueFromDefault: (defaultValue: defaultFilterValue, filter: FilterValue) => {
        value: {
            start: string;
            end: string;
            relative: string;
        };
        min?: string;
        max?: string;
        relativeOptions?: {
            value: string;
            text: string;
            disabled?: boolean;
        }[];
        type: import("../../_filters/filter-input/enum").FilterType;
        name: string;
        text: string;
        mandatory?: boolean | undefined | undefined;
        index?: number | undefined | undefined;
    } | {
        value: {
            start: string;
            end: string;
            relative: string;
        };
        minimumLength?: number | undefined;
        pattern?: string | undefined;
        text: string;
        name: string;
        type: import("../../_filters/filter-input/enum").FilterType;
        mandatory?: boolean | undefined;
        index?: number | undefined;
    } | {
        value: {
            start: string;
            end: string;
            relative: string;
        };
        options: Array<import("../../_filters/types").FilterOption>;
        staticOptionNameValue?: string;
        dynamicResourceEndpoint?: string;
        text: string;
        name: string;
        type: import("../../_filters/filter-input/enum").FilterType;
        mandatory?: boolean | undefined;
        index?: number | undefined;
    } | {
        value: {
            start: string;
            end: string;
            relative: string;
        };
        values: string[];
        type: import("../../_filters/filter-input/enum").FilterType;
        name: string;
        text: string;
        mandatory?: boolean | undefined | undefined;
        index?: number | undefined | undefined;
        options: Array<import("../../_filters/types").FilterOption>;
        staticOptionNameValue?: string;
        dynamicResourceEndpoint?: string;
    } | {
        value: {
            start: string;
            end: string;
            relative: string;
        };
        min?: string;
        max?: string;
        type: import("../../_filters/filter-input/enum").FilterType;
        name: string;
        text: string;
        mandatory?: boolean | undefined | undefined;
        index?: number | undefined | undefined;
    } | {
        value: {
            start: string;
            end: string;
            relative: string;
        };
        min?: string;
        max?: string;
        relativeOptions?: {
            value: string;
            text: string;
            disabled?: boolean;
        }[];
        quickFilterOptions?: {
            value: string;
            text: string;
            disabled?: boolean;
        }[];
        granularityOptions?: {
            value: string;
            text: string;
        }[];
        type: import("../../_filters/filter-input/enum").FilterType;
        name: string;
        text: string;
        mandatory?: boolean | undefined | undefined;
        index?: number | undefined | undefined;
    };
};
export default _default;
