import React from "react"; import { FlatList, FlatListProps, LayoutChangeEvent, ListRenderItemInfo, NativeScrollEvent, NativeSyntheticEvent, StyleProp, ViewStyle } from "react-native"; export interface DragListRenderItemInfo extends ListRenderItemInfo { /** * Call this function whenever you detect a drag motion starting. */ onDragStart: () => void; /** * Call this function whenever a drag motion ends (e.g. onPressOut) */ onDragEnd: () => void; /** * @deprecated Use onDragStart instead * @see onDragStart */ onStartDrag: () => void; /** * @deprecated Use onDragEnd instead * @see onDragEnd */ onEndDrag: () => void; /** * Whether the item is being dragged at the moment. */ isActive: boolean; } interface Props extends Omit, "renderItem"> { data: T[]; keyExtractor: (item: T, index: number) => string; renderItem: (info: DragListRenderItemInfo) => React.ReactElement | null; containerStyle?: StyleProp; onDragBegin?: () => void; onDragEnd?: () => void; onHoverChanged?: (hoverIndex: number) => Promise | void; onReordered?: (fromIndex: number, toIndex: number) => Promise | void; onScroll?: (event: NativeSyntheticEvent) => void; onLayout?: (e: LayoutChangeEvent) => void; CustomFlatList?: typeof FlatList; } declare const DragList: (props: Props & { ref?: ((instance: FlatList | null) => void) | React.MutableRefObject | null> | null | undefined; }) => React.ReactElement; export default DragList;