import * as React from 'react'; import { SafeAreaView } from 'react-native-safe-area-context'; import { useColors } from '../../hook'; import { SlideModal, SlideModalRef } from '../../ui/Modal'; import type { BottomVoiceBarProps, BottomVoiceBarRef } from './types'; import { VoiceBar } from './VoiceBar'; export const BottomVoiceBar = React.forwardRef< BottomVoiceBarRef, BottomVoiceBarProps >(function ( props: BottomVoiceBarProps, ref?: React.ForwardedRef ) { const { onRequestModalClose, ...others } = props; const modalRef = React.useRef({} as any); const { getColor } = useColors(); React.useImperativeHandle(ref, () => { return { startHide: (onFinished?: () => void) => { modalRef?.current?.startHide?.(onFinished); }, startShow: () => { modalRef?.current?.startShow?.(); }, }; }, []); return ( ); });