import cx from 'clsx'; import { generatePath } from 'react-router-dom'; import { IdBlock } from '@/shared/ui/idBlock'; import { TimestampBlock } from '@/shared/ui/timestampBlock'; import FlagSVG from '@/shared/assets/images/indicators/flag.svg?react'; import DirectionSVG from '@/shared/assets/images/indicators/messageDirection.svg?react'; import { routes } from '@/shared/config'; import { BulbBlock, BulbStatus } from '@/shared/ui/bulbBlock'; import { MessageFromProgram, MessageToProgram } from '../../api'; import { isMessageWithError } from '../../utils'; import styles from './message-card.module.scss'; type Props = { isToDirection: boolean; message: MessageToProgram | MessageFromProgram; }; const MessageCard = ({ isToDirection, message }: Props) => { const { id, timestamp, service, fn } = message; return (