import { ExtendedKind } from '@/constants' import { Separator } from '@/components/ui/separator' import { getCachedThreadContextEvents } from '@/lib/navigation-related-events' import { toNote } from '@/lib/link' import { useSmartNoteNavigationOptional } from '@/PageManager' import client from '@/services/client.service' import { Pin } from 'lucide-react' import { Event } from 'nostr-tools' import { useTranslation } from 'react-i18next' import Collapsible from '../Collapsible' import Note from '../Note' import NoteStats from '../NoteStats' import RepostDescription from './RepostDescription' export default function MainNoteCard({ event, className, reposter, embedded, originalNoteId, pinned = false, hideParentNotePreview = false, zapPollVoteHighlightOption, bottomNoteLabel, showFull = false }: { event: Event className?: string reposter?: string embedded?: boolean originalNoteId?: string /** Profile (or other) pinned highlight */ pinned?: boolean /** Hide the parent note preview (e.g. when showing quotes of current note). */ hideParentNotePreview?: boolean zapPollVoteHighlightOption?: number bottomNoteLabel?: string showFull?: boolean }) { const { t } = useTranslation() const { navigateToNote } = useSmartNoteNavigationOptional() const isZapFeedCard = event.kind === ExtendedKind.ZAP_RECEIPT || event.kind === ExtendedKind.ZAP_REQUEST const showNoteStatsRow = !embedded || isZapFeedCard return (