import { forwardRef, useImperativeHandle, useRef } from 'react'; import { BaseSheet, BaseSheetProps } from './BaseSheet'; import { AppBottomSheet, AppBottomSheetRefHanldes } from './index'; type AppBaseBottomSheetProps = BaseSheetProps & { onDismiss?: () => void; androidInputMode?: 'adjustPan' | 'adjustResize'; }; export const AppBaseBottomSheet = forwardRef( (props, ref) => { const bottomSheetRef = useRef(null); useImperativeHandle(ref, () => ({ show: () => { bottomSheetRef.current?.show(); }, hide: () => { bottomSheetRef.current?.hide(); } })); const handlePositivePress = () => { bottomSheetRef.current?.hide(); props.onPositivePress?.(); }; const handleNegativePress = () => { bottomSheetRef.current?.hide(); props.onNegativePress?.(); }; return ( ); } );