import React from "react";
import {isChannel, isGroup, isMessageByMe} from "../utils/helpers";

//strings

//actions

//components
import AsideThreadsLastSeenMessageText from "./AsideThreadsLastSeenMessageText";
import AsideThreadsLastSeenMessageInfo from "./AsideThreadsLastSeenMessageInfo";
import Container from "../../../Talk-ui-kit/src/container";

//styling

//functions

export default function(props) {
  const {thread, user} = props;
  const {lastMessageVO, lastMessage, inviter, time, isTyping, draftMessage} = thread;
  const args = {
    isGroup: isGroup(thread),
    isChannel: isChannel(thread),
    isMessageByMe: isMessageByMe(lastMessageVO, user, thread),
    lastMessageVO,
    lastMessage,
    draftMessage,
    inviter,
    time,
    isTyping,
    thread
  };
  return (
    <Container>
      <AsideThreadsLastSeenMessageText {...args}/>
      <AsideThreadsLastSeenMessageInfo {...args}/>
    </Container>
  )
}