import React from "react";
import {mobileCheck, decodeEmoji, clearHtml, emailify, mentionify, urlify, isLTR} from "../utils/helpers";

//strings

//actions

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

//styling

//statics

//functions


export default function ({message}) {
  const isLtr = isLTR(message);
  return <Container userSelect={mobileCheck() ? "none" : "text"} onDoubleClick={e => e.stopPropagation()}>
    <Text isHTML wordWrap="breakWord" whiteSpace="preWrap" color="text" dark style={isLtr ? {direction: "ltr", textAlign: "left"} : null}>
      {mentionify(emailify(decodeEmoji(urlify(clearHtml(message)))))}
    </Text>
  </Container>
}