import * as React from "bloatless-react"; import { closeChatView, isShowingObjects, selectedChat, toggleChatTools } from "../Model/model"; import { ChatObjectView } from "../Views/Objects/chatObjectView"; import { ChatOptionModal } from "../Views/Chat/chatOptionModal"; import { MessageComposer } from "../Views/Chat/messageComposer"; import { ThreadView } from "../Views/Chat/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; } return [
, ChatObjectView(chat), ThreadView(chat), , ChatOptionModal(chat, isShowingOptions), ]; }); return (
); }