2022-05-27 17:27:43 +00:00
|
|
|
import React from 'react';
|
|
|
|
import { StyleSheet, View } from 'react-native';
|
|
|
|
|
|
|
|
import Encrypted from './Encrypted';
|
|
|
|
import Edited from './Edited';
|
|
|
|
import MessageError from './MessageError';
|
|
|
|
import ReadReceipt from './ReadReceipt';
|
|
|
|
import { MessageType } from '../../../../definitions';
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
actionIcons: {
|
|
|
|
flexDirection: 'row'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
interface IRightIcons {
|
|
|
|
type: MessageType;
|
|
|
|
msg?: string;
|
|
|
|
isEdited: boolean;
|
2022-10-18 18:25:15 +00:00
|
|
|
isReadReceiptEnabled?: boolean;
|
|
|
|
unread?: boolean;
|
2022-05-27 17:27:43 +00:00
|
|
|
hasError: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
const RightIcons = ({ type, msg, isEdited, hasError, isReadReceiptEnabled, unread }: IRightIcons) => (
|
|
|
|
<View style={styles.actionIcons}>
|
|
|
|
<Encrypted type={type} />
|
|
|
|
<Edited testID={`${msg}-edited`} isEdited={isEdited} />
|
|
|
|
<MessageError hasError={hasError} />
|
2022-10-18 18:25:15 +00:00
|
|
|
<ReadReceipt isReadReceiptEnabled={isReadReceiptEnabled} unread={unread} />
|
2022-05-27 17:27:43 +00:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default RightIcons;
|