import type { PinnedMessage } from '@chat-app/shared/chat'; import { PinIcon, XIcon } from './icons'; interface Props { open: boolean; pins: PinnedMessage[]; onClose: () => void; onJump: (messageId: string) => void; onUnpin: (messageId: string) => void; // Optional preview-renderer: parent resolves messageId → short text/snippet // since the panel itself doesn't decrypt. If absent, the panel just shows // the message-id stub. renderPreview?: (messageId: string) => React.ReactNode; } export function PinnedMessagesPanel({ open, pins, onClose, onJump, onUnpin, renderPreview }: Props) { if (!open) return null; return ( ); }