import { X } from "lucide-react"; import type { TimelineMessage } from "@/features/messages/types"; import type { UserProfileLookup } from "@/features/profile/lib/identity"; import type { Channel } from "@/shared/api/types"; import { Button } from "@/shared/ui/button"; import { MessageComposer } from "./MessageComposer"; import { MessageRow } from "./MessageRow"; import { TimelineMessageList } from "./TimelineMessageList"; import { TypingIndicatorRow } from "./TypingIndicatorRow"; type MessageThreadSidebarProps = { channel: Channel | null; currentPubkey?: string; headMessage: TimelineMessage; isSending: boolean; messages: TimelineMessage[]; onCancelReply: () => void; onClose: () => void; onDelete?: (message: TimelineMessage) => void; onReply: (message: TimelineMessage) => void; onSend: ( content: string, mentionPubkeys: string[], mediaTags?: string[][], ) => Promise; onToggleReaction?: ( message: TimelineMessage, emoji: string, remove: boolean, ) => Promise; personaLookup?: Map; profiles?: UserProfileLookup; replyTargetMessage: TimelineMessage | null; typingPubkeys: string[]; }; export function MessageThreadSidebar({ channel, currentPubkey, headMessage, isSending, messages, onCancelReply, onClose, onDelete, onReply, onSend, onToggleReaction, personaLookup, profiles, replyTargetMessage, typingPubkeys, }: MessageThreadSidebarProps) { const threadReplyTarget = replyTargetMessage && replyTargetMessage.id !== headMessage.id ? { author: replyTargetMessage.author, body: replyTargetMessage.body, id: replyTargetMessage.id, } : null; const canReplyInChannel = !!channel && channel.isMember && channel.archivedAt === null && channel.channelType !== "forum"; return ( ); }