import { BidiText } from '@/components/foundation/BidiText'; import { StatusBadge, type StatusTone } from '@/components/foundation/StatusBadge'; import { Card } from '@/components/surfaces/Card'; import { Heading, Text, type HeadingLevel } from '@/components/typography/Typography'; import styles from './ProductPreview.module.css'; export interface PreviewRow { id: string; primary: string; secondary: string; status: string; statusTone?: StatusTone; } interface ProductPreviewProps { title: string; caption: string; rows: PreviewRow[]; illustrativeLabel: string; emptyLabel?: string; headingLevel?: HeadingLevel; } export function ProductPreview({ title, caption, rows, illustrativeLabel, emptyLabel = 'No preview data', headingLevel = 3, }: ProductPreviewProps) { return (
{title} {illustrativeLabel}
{rows.length > 0 ? (
{rows.map((row) => (
{row.primary} {row.secondary}
{row.status}
))}
) : (

{emptyLabel}

)}
{caption}
); }