import React from 'react'; import { StyleSheet, View } from 'react-native'; import FastImage from 'react-native-fast-image'; import { BlockContext } from '@rocket.chat/ui-kit'; import ImageContainer from '../message/Image'; import Navigation from '../../lib/navigation/appNavigation'; import { IThumb, IImage, IElement } from './interfaces'; import { IAttachment } from '../../definitions'; const styles = StyleSheet.create({ image: { borderRadius: 2 }, mediaContext: { marginRight: 8 } }); const ThumbContext = (args: IThumb) => ( ); export const Thumb = ({ element, size = 88 }: IThumb) => ( ); export const Media = ({ element }: IImage) => { const showAttachment = (attachment: IAttachment) => Navigation.navigate('AttachmentView', { attachment }); const imageUrl = element?.imageUrl ?? ''; return ; }; const genericImage = (element: IElement, context?: number) => { switch (context) { case BlockContext.SECTION: return ; case BlockContext.CONTEXT: return ; default: return ; } }; export const Image = ({ element, context }: IImage) => genericImage(element, context);