import { DEFAULT_BACKDROP_OPACITY } from '@/core/constants'; import RNBottomSheet, { BottomSheetBackdrop, BottomSheetProps as RNBottomSheetProps, } from '@gorhom/bottom-sheet'; import { BottomSheetDefaultBackdropProps } from '@gorhom/bottom-sheet/lib/typescript/components/bottomSheetBackdrop/types'; import { BottomSheetMethods } from '@gorhom/bottom-sheet/lib/typescript/types'; import { useTailwind } from '@/hooks'; import { ForwardedRef, forwardRef, useCallback } from 'react'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { Style } from 'twrnc/dist/esm/types'; interface BottomSheetProps extends RNBottomSheetProps, Pick { backdropOpacity?: number; backdropPressBehavior?: BottomSheetDefaultBackdropProps['pressBehavior']; hasHandle?: boolean; handleStyle?: Style; handleIndicatorStyle?: Style; backgroundStyle?: Style; } function BottomSheet( { backdropOpacity = DEFAULT_BACKDROP_OPACITY, enableTouchThrough, backdropPressBehavior, hasHandle = true, handleStyle, handleIndicatorStyle, backgroundStyle, ...props }: BottomSheetProps, ref: ForwardedRef, ) { const tw = useTailwind(); const { top } = useSafeAreaInsets(); const backdropComponent = useCallback( (backdropProps: BottomSheetDefaultBackdropProps) => ( ), [backdropOpacity, enableTouchThrough, backdropPressBehavior], ); return ( ); } export default forwardRef(BottomSheet);