import { DateRange } from 'react-day-picker'; export type RangeButtonType = 'last7Days' | 'next7Days' | 'thisWeekToDate' | 'thisWeek' | 'lastWeek' | 'nextWeek' | 'lastMonth' | 'thisMonth' | 'thisMonthToDate' | 'nextMonth' | 'thisQuarter' | 'thisQuarterToDate' | 'lastQuarter' | 'nextQuarter' | 'thisYear' | 'thisYearToDate' | 'lastYear' | 'nextYear'; export type SingleButtonType = 'today' | 'yesterday' | 'tomorrow'; export declare const trimWhitespace: (str: string) => string; /** * Checks if the given string is either empty or contains only whitespace characters. * * @param {string} str - The string to check. * @returns {boolean} - Returns true if the string is empty or contains only whitespace, otherwise false. */ export declare const isEmptyOrWhitespace: (str: string) => boolean; /** * Returns a date range object (`from` and `to` dates) based on the specified button type. * * @param {RangeButtonType} buttonType - The type of action button representing a specific date range. * @returns {DateRange} - An object containing `from` and `to` dates for the specified button type. */ export declare const getDateRangeForButtonType: (buttonType: RangeButtonType) => DateRange; /** * Validates whether a given string is a valid date in the format MM/DD/YYYY. * * @param {string} dateString - The date string to validate. * @returns {boolean} - Returns true if the string is empty, contains only whitespace, or is a valid date in the specified format. Otherwise, returns false. */ export declare const isValidDateString: (dateString: string) => boolean; /** * Parses a date range string in the format "MM/DD/YYYY - MM/DD/YYYY" into a DateRange object. * * @param {string} dateRangeString - The date range string to parse. * @returns {DateRange | null} - Returns a DateRange object with `from` and `to` dates if valid, otherwise null. */ export declare const parseDateRangeString: (dateRangeString: string) => DateRange | null; export declare const isDateRangeValidWithRestrictions: (dateRange: DateRange, dateRestrictions?: { beforeDate?: Date; afterDate?: Date; }) => boolean; /** * Adjusts a date range to comply with specified date restrictions. * If the date range falls outside the restrictions, it will be adjusted to the nearest valid dates. * * @param {DateRange} dateRange - The date range to be adjusted, containing `from` and `to` dates. * @param {Object} [dateRestrictions] - Optional restrictions for the date range. * @param {Date} [dateRestrictions.beforeDate] - The date before which the range cannot start. * @param {Date} [dateRestrictions.afterDate] - The date after which the range cannot end. * @returns {DateRange} - The adjusted date range that complies with the restrictions. */ export declare const adjustDateRangeWithRestrictions: (dateRange: DateRange, dateRestrictions?: { beforeDate?: Date; afterDate?: Date; }) => DateRange; /** * Returns a date based on the specified single date button type. * * @param {SingleButtonType} buttonType - The type of action button representing a specific date * @returns {Date} - The date for the specified button type */ export declare const getDateForButtonType: (buttonType: SingleButtonType) => Date; /** * Checks if a single date is valid considering restrictions like not showing past dates * and specific before/after date restrictions. * * @param {Date} date - The date to validate. * @param {boolean} showPastDates - Whether past dates are allowed. * @param {object} [dateRestrictions] - Optional restrictions for the date. * @param {Date} [dateRestrictions.beforeDate] - The date before which the input date is invalid. * @param {Date} [dateRestrictions.afterDate] - The date after which the input date is invalid. * @returns {boolean} - True if the date is valid within the restrictions, false otherwise. */ export declare const isSingleDateValidWithRestrictions: (date: Date, dateRestrictions?: { beforeDate?: Date; afterDate?: Date; }) => boolean; export type ButtonConfig = { show: boolean; onClick: () => void; label: string; groupName: string; }; export declare const getSingleDateButtonConfigs: ({ showTodaySelector, showYesterdaySelector, showTomorrowSelector, selectToday, selectYesterday, selectTomorrow, dateRestrictions, }: { showTodaySelector?: boolean; showYesterdaySelector?: boolean; showTomorrowSelector?: boolean; selectToday: () => void; selectYesterday: () => void; selectTomorrow: () => void; dateRestrictions?: { beforeDate?: Date; afterDate?: Date; }; }) => ButtonConfig[]; export declare const getRangeDateButtonConfigs: ({ last7Days, next7Days, thisWeekToDate, thisWeek, lastWeek, nextWeek, thisMonth, lastMonth, thisMonthToDate, nextMonth, thisQuarter, thisQuarterToDate, lastQuarter, nextQuarter, thisYear, thisYearToDate, lastYear, nextYear, selectLast7Days, selectNext7Days, selectThisWeekToDate, selectThisWeek, selectLastWeek, selectNextWeek, selectThisMonth, selectLastMonth, selectThisMonthToDate, selectNextMonth, selectThisQuarter, selectThisQuarterToDate, selectLastQuarter, selectNextQuarter, selectThisYear, selectThisYearToDate, selectLastYear, selectNextYear, dateRestrictions, }: { last7Days?: boolean; next7Days?: boolean; thisWeekToDate?: boolean; thisWeek?: boolean; lastWeek?: boolean; nextWeek?: boolean; thisMonth?: boolean; lastMonth?: boolean; thisMonthToDate?: boolean; nextMonth?: boolean; thisQuarter?: boolean; thisQuarterToDate?: boolean; lastQuarter?: boolean; nextQuarter?: boolean; thisYear?: boolean; thisYearToDate?: boolean; lastYear?: boolean; nextYear?: boolean; selectLast7Days: () => void; selectNext7Days: () => void; selectThisWeekToDate: () => void; selectThisWeek: () => void; selectLastWeek: () => void; selectNextWeek: () => void; selectThisMonth: () => void; selectLastMonth: () => void; selectThisMonthToDate: () => void; selectNextMonth: () => void; selectThisQuarter: () => void; selectThisQuarterToDate: () => void; selectLastQuarter: () => void; selectNextQuarter: () => void; selectThisYear: () => void; selectThisYearToDate: () => void; selectLastYear: () => void; selectNextYear: () => void; dateRestrictions?: { beforeDate?: Date; afterDate?: Date; }; }) => ButtonConfig[]; export type MainButtonType = 'day' | 'week' | 'month' | 'quarter' | 'year'; export declare const renderButtons: (buttonConfigs: ButtonConfig[], selectedBtnType: SingleButtonType | RangeButtonType | null, c: (key: string) => string, type: "single" | "range", selectedGroup: string | null, onGroupSelect: (group: string | null) => void, reset: boolean, handleReset: () => void) => import("react/jsx-runtime").JSX.Element; interface RenderActionButtonsParams { type: 'single' | 'range'; actionButtons: any; selectedBtnType: RangeButtonType | SingleButtonType | null; c: (key: string) => string; selectedGroup: string | null; setSelectedGroup: (group: string | null) => void; handlers: any; reset: boolean; handleReset: () => void; dateRestrictions?: { beforeDate?: Date; afterDate?: Date; }; } export declare function renderActionButtons({ type, actionButtons, selectedBtnType, c, selectedGroup, setSelectedGroup, handlers, reset, handleReset, dateRestrictions, }: RenderActionButtonsParams): import("react/jsx-runtime").JSX.Element; export declare const getSelectedDate: (selectedDate: Date | undefined, dateRestrictions?: { beforeDate?: Date; afterDate?: Date; }) => Date | undefined; export declare const getSelectedDateRange: (selectedDateRange: DateRange | undefined, dateRestrictions?: { beforeDate?: Date; afterDate?: Date; }) => DateRange | undefined; export {};