import * as React from 'react'; import { StyleProp, ViewStyle } from 'react-native'; import { ChatMessage } from '../../rename.chat'; import { type VideoPreviewProps, type VideoPreviewRef } from '../../ui/VideoPreview'; import type { ContextNameMenuRef, PropsWithBack } from '../types'; /** * Video Message Preview Component properties. */ export type VideoMessagePreviewProps = PropsWithBack & { /** * Message id. */ msgId: string; /** * local message id. */ localMsgId: string; /** * Chat message. */ msg?: ChatMessage; /** * Container style for the file preview component. */ containerStyle?: StyleProp; /** * Custom video preview component. */ videoPreviewComponent?: React.ForwardRefExoticComponent>; /** * Additional props to pass to the video preview component. * These props will be merged with (and can override) the base VideoPreviewProps. */ videoPreviewProps?: Partial; /** * Custom video preview component ref. * * Use this to access the video preview component's methods from the parent component. * * @example * ```tsx * function MyScreen() { * const videoRef = useRef(null); * * const handleSpeedChange = () => { * videoRef.current?.setPlaybackSpeed(2.0); * }; * * return ( * * msgId="message-id" * localMsgId="local-message-id" * videoPreviewComponent={CustomVideoPreview} * videoPreviewRef={videoRef} // Pass your ref here * videoPreviewProps={{ * showWatermark: true, * }} * /> * ); * } * ``` */ videoPreviewRef?: React.RefObject; /** * Callback function for showing the bottom sheet. */ onShowBottomSheet?: (menuRef: React.RefObject) => void; }; /** * Video Message Preview Component. */ export declare function VideoMessagePreview(props: VideoMessagePreviewProps): import("react/jsx-runtime").JSX.Element; type ImageSize = { width: number; height: number; }; export declare function useVideoMessagePreview(props: VideoMessagePreviewProps): { url: string | undefined; size: ImageSize; videoRef: React.RefObject; onVideoError: (error: any) => void; onClickedVideo: () => void; showLoading: boolean; thumbnailUrl: string | undefined; onEnd: () => void; pause: boolean; menuRef: React.RefObject; onRequestCloseMenu: (onFinished?: () => void) => void; showBottomSheet: () => void; }; export {}; //# sourceMappingURL=VideoMessagePreview.d.ts.map