import { Dispatch } from 'react'; import { SwipeableProps } from 'react-swipeable'; export 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 type Action = NextPageAction | PreviousPageAction | StopSlideAction | GoToPageAction; export 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; /** Whether or not slide after swiping left/right. */ shouldSlideOnSwipe?: boolean; /** Whether the document is in RTL mode. */ isRTL?: boolean; } export declare const useSlider: ({ totalItems, itemsPerPage, infiniteMode, shouldSlideOnSwipe, isRTL, ...swipeableConfigOverrides }: UseSliderArgs) => { handlers: import('react-swipeable').SwipeableHandlers; slide: (page: SlideDirection | number, dispatch: Dispatch) => void; sliderState: SliderState; sliderDispatch: Dispatch; }; export {}; //# sourceMappingURL=useSlider.d.ts.map