// SPDX-License-Identifier: AGPL-3.0-or-later import styles from '@app/features/channel/components/ChannelChatLayout.module.css'; import {msg} from '@lingui/core/macro'; import {useLingui} from '@lingui/react/macro'; import {observer} from 'mobx-react-lite'; import type React from 'react'; import {createContext, useContext} from 'react'; const MESSAGES_DESCRIPTOR = msg({ message: 'Messages', comment: 'Short label in the channel chat layout. Keep it concise.', }); const MESSAGE_COMPOSER_DESCRIPTOR = msg({ message: 'Message composer', comment: 'Short label in the channel chat layout. Keep it concise.', }); interface ChannelChatLayoutProps { messages: React.ReactNode; textarea: React.ReactNode; hideBottomBar?: boolean; } const ChannelComposerAmbientStatusVisibilityContext = createContext(true); export function useChannelComposerAmbientStatusVisibility(): boolean { return useContext(ChannelComposerAmbientStatusVisibilityContext); } export const ChannelChatLayout = observer(({messages, textarea, hideBottomBar = false}: ChannelChatLayoutProps) => { const {i18n} = useLingui(); return (