import React from 'react';
import { View } from 'react-native';
import Avatar from '../Avatar';
import { DisplayMode } from '../../lib/constants';
import TypeIcon from './TypeIcon';
import styles from './styles';
import { IIconOrAvatar } from './interfaces';
const IconOrAvatar = ({
avatar,
type,
rid,
showAvatar,
prid,
status,
isGroupChat,
teamMain,
showLastMessage,
displayMode,
sourceType,
isUserProfile
}: IIconOrAvatar): React.ReactElement | null => {
if (showAvatar) {
return (
);
}
if (displayMode === DisplayMode.Expanded && showLastMessage) {
return (
);
}
return null;
};
export default IconOrAvatar;