import * as React from "bloatless-react"; import { closeChatView, selectedChat } from "../Model/model"; import { ChatOptionModal } from "../Views/chatOptionModal"; import { MessageComposer } from "../Views/messageComposer"; import { ThreadView } from "../Views/threadView"; import { translation } from "../translations"; export function MessageTab() { const messageTabContent = React.createProxyState([selectedChat], () => { if (selectedChat.value == undefined) return (
{translation.noChatSelected}
); const chat = selectedChat.value; const isShowingOptions = new React.State(false); function showOptions() { isShowingOptions.value = true; } function hideOptions() { isShowingOptions.value = false; } return (
{ThreadView(chat)} {ChatOptionModal(chat, isShowingOptions)}
); }); return
; }