/** * Universal content component that uses the content parser service * for all Nostr content fields */ import { useEventFieldParser } from '@/hooks/useContentParser' import { Event } from 'nostr-tools' import ImageWithLightbox from '../ImageWithLightbox' import WebPreview from '../WebPreview' import HighlightSourcePreview from './HighlightSourcePreview' interface ParsedContentProps { event: Event field: 'content' | 'title' | 'summary' | 'description' className?: string enableMath?: boolean enableSyntaxHighlighting?: boolean showMedia?: boolean showLinks?: boolean showHashtags?: boolean showNostrLinks?: boolean showHighlightSources?: boolean } export default function ParsedContent({ event, field, className = '', enableMath = true, enableSyntaxHighlighting = true, showMedia = true, showLinks = false, showHashtags = false, showNostrLinks = false, showHighlightSources = false, }: ParsedContentProps) { const { parsedContent, isLoading, error } = useEventFieldParser(event, field, { enableMath, enableSyntaxHighlighting }) if (isLoading) { return (