// SPDX-License-Identifier: AGPL-3.0-or-later import styles from '@app/features/channel/components/ChannelEditBar.module.css'; import wrapperStyles from '@app/features/channel/components/textarea/InputWrapper.module.css'; import type {Channel} from '@app/features/channel/models/Channel'; import * as MessageCommands from '@app/features/messaging/commands/MessageCommands'; import FocusRing from '@app/features/ui/focus_ring/FocusRing'; import {msg} from '@lingui/core/macro'; import {Trans, useLingui} from '@lingui/react/macro'; import {XCircleIcon} from '@phosphor-icons/react'; import {observer} from 'mobx-react-lite'; const CANCEL_EDITING_MESSAGE_DESCRIPTOR = msg({ message: 'Cancel editing message', comment: 'Button or menu action label in the channel and chat edit bar. Keep it concise.', }); interface EditBarProps { channel: Channel; onCancel: () => void; } export const EditBar = observer(({channel, onCancel}: EditBarProps) => { const {i18n} = useLingui(); const handleStopEdit = () => { MessageCommands.stopEditMobile(channel.id); onCancel(); }; return (