import React from "react";
import {avatarNameGenerator} from "../utils/helpers";

//strings

//actions

//components
import {Text} from "../../../Talk-ui-kit/src/typography";

//styling

//statics

//functions

export default function ({message, isFirstMessage, isMessageByMe}) {
  const messageParticipant = message.participant;
  const color = avatarNameGenerator(messageParticipant.name).color;
  return isFirstMessage &&
    <Text size="sm" bold
          style={{color: color}}>{isMessageByMe ? messageParticipant.name : messageParticipant.contactName || messageParticipant.name}</Text>
}