import { CHANGELOG_SECTION_LABELS, type ChangelogRelease, } from "@/lib/changelog-types"; import { buildReleaseParagraph, formatReleaseDate, shouldUseParagraphSummary, } from "@/lib/changelog-display"; import { ChangelogItem } from "@/components/changelog-item"; import { cn } from "@/lib/utils"; import { APP_VERSION } from "@/lib/version"; type ChangelogVersionCardProps = { release: ChangelogRelease; }; export function ChangelogVersionCard({ release }: ChangelogVersionCardProps) { const isCurrent = release.version === APP_VERSION; const useParagraph = Boolean(release.summary) || shouldUseParagraphSummary(release.sections); return (

v{release.version}

{isCurrent && ( Current Version )}
{release.summary ? (

{release.summary}

) : useParagraph ? (

{buildReleaseParagraph(release.sections)}

) : (
{release.sections.map((section) => (

{CHANGELOG_SECTION_LABELS[section.title]}

    {section.items.map((item, index) => ( ))}
))}
)}
); }