import { SlideDirection } from './PickersSlideTransition'; import { MuiPickersAdapter } from '../internals/models'; import type { CalendarPickerDefaultizedProps } from './CalendarPicker'; interface CalendarState { currentMonth: TDate; focusedDay: TDate | null; isMonthSwitchingAnimating: boolean; slideDirection: SlideDirection; } declare type ReducerAction = { type: TType; } & TAdditional; interface ChangeMonthPayload { direction: SlideDirection; newMonth: TDate; } interface ChangeFocusedDayPayload { focusedDay: TDate | null; /** * The update does not trigger month switching animation. * For example: when selecting month from the month view. */ withoutMonthSwitchingAnimation?: boolean; } export declare const createCalendarStateReducer: (reduceAnimations: boolean, disableSwitchToMonthOnDayFocus: boolean, utils: MuiPickersAdapter) => (state: CalendarState, action: { type: "finishMonthSwitchingAnimation"; } | ReducerAction<"changeMonth", ChangeMonthPayload> | ReducerAction<"changeFocusedDay", ChangeFocusedDayPayload>) => CalendarState; interface CalendarStateInput extends Pick, 'date' | 'defaultCalendarMonth' | 'disableFuture' | 'disablePast' | 'minDate' | 'maxDate' | 'onMonthChange' | 'reduceAnimations' | 'shouldDisableDate'> { disableSwitchToMonthOnDayFocus?: boolean; } export declare const useCalendarState: ({ date, defaultCalendarMonth, disableFuture, disablePast, disableSwitchToMonthOnDayFocus, maxDate, minDate, onMonthChange, reduceAnimations, shouldDisableDate, }: CalendarStateInput) => { calendarState: CalendarState; changeMonth: (newDate: TDate) => void; changeFocusedDay: (newFocusedDate: TDate | null, withoutMonthSwitchingAnimation?: boolean) => void; isDateDisabled: (day: TDate | null) => boolean; onMonthSwitchingAnimationEnd: () => void; handleChangeMonth: (payload: ChangeMonthPayload) => void; }; export {};