import React from "react";
import { useTranslation } from "react-i18next";
import styled from "styled-components";
import { useMessage } from "react-sync-board";
import useNotify from "../../hooks/useNotify";
import Touch from "../ui/Touch";
import SidePanel from "../ui/SidePanel";
import Composer from "./Composer";
import MessageList from "./MessageList";
const StyledChat = styled.div`
height: 100%;
display: flex;
flex-direction: column;
`;
const NotifCount = styled.div`
width: 2em;
height: 2em;
border-radius: 100%;
position: absolute;
top: -5px;
right: 1.8em;
background-color: var(--color-success);
text-align: center;
line-height: 2em;
box-shadow: 3px 3px 6px #000000c0;
`;
export const MessagePanel = ({ onNewMessage, show, setShow }) => {
const { t } = useTranslation();
const { messages, sendMessage } = useMessage(onNewMessage, true);
return (