import {GestureDetector} from "react-native-gesture-handler"

import {type UseBottomSheetDragGestureArgs, useBottomSheetDragGesture} from "../hooks"

export function BottomSheetDragGesture({
    children,
    ...rest
}: React.PropsWithChildren<UseBottomSheetDragGestureArgs>) {
    const gesture = useBottomSheetDragGesture(rest)

    return <GestureDetector gesture={gesture}>{children}</GestureDetector>
}
