import type { Dispatch } from 'react'; import type { SwipeableProps } from 'react-swipeable'; export declare type SlideDirection = 'next' | 'previous'; interface NextPageAction { type: 'NEXT_PAGE'; } interface PreviousPageAction { type: 'PREVIOUS_PAGE'; } interface GoToPageAction { type: 'GO_TO_PAGE'; payload: { pageIndex: number; shouldSlide: boolean; }; } interface StopSlideAction { type: 'STOP_SLIDE'; } export declare type Action = NextPageAction | PreviousPageAction | StopSlideAction | GoToPageAction; export declare type SliderDispatch = Dispatch; export interface SliderState { /** * The `currentItem` in a Slider with multiple items in a single page is * always **the one with the lowest index** in the current page. */ currentItem: number; /** Currently active page */ currentPage: number; /** * Whether or not the Slider is currently sliding. This is useful to * manipulate the `transition` property in a component. */ sliding: boolean; /** The direction in which the Slider is sliding. */ slideDirection: SlideDirection; /** The total number of unique items in the slider. */ totalItems: number; /** The number of items in a single page. */ itemsPerPage: number; /** The total number of pages in the slider. */ totalPages: number; /** Whether or not the slider is infinite. */ infinite: boolean; } export declare const nextPage: (current: number, total: number) => number; export declare const previousPage: (current: number, total: number) => number; export interface UseSliderArgs extends SwipeableProps { /** The total number of unique items in the slider. */ totalItems: number; /** The number of items in a single slider page. */ itemsPerPage?: number; /** Whether or not the slider is infinite. */ infiniteMode?: boolean; } export default function useSlider({ totalItems, itemsPerPage, infiniteMode, ...swipeableConfigOverrides }: UseSliderArgs): { handlers: import("react-swipeable").SwipeableHandlers; slide: (page: number | "next" | "previous", dispatch: Dispatch) => void; sliderState: SliderState; sliderDispatch: Dispatch; }; export {};