import * as React from 'react' import { cn } from '../core/cn' interface DetailField { label: string value: React.ReactNode span?: 1 | 2 } interface DetailTab { label: string value: string content: React.ReactNode count?: number } interface TimelineEvent { id: string title: string description?: string timestamp: string icon?: React.ReactNode variant?: 'default' | 'success' | 'warning' | 'error' } interface DetailPageProps { title: string subtitle?: string badge?: React.ReactNode avatar?: React.ReactNode actions?: React.ReactNode onBack?: () => void fields: DetailField[] tabs?: DetailTab[] activeTab?: string onTabChange?: (value: string) => void timeline?: TimelineEvent[] className?: string } const variantDotColors = { default: 'bg-primary', success: 'bg-green-500', warning: 'bg-amber-500', error: 'bg-red-500', } export function detailPage({ title, subtitle, badge, avatar, actions, onBack, fields, tabs, activeTab, onTabChange, timeline, className, }: DetailPageProps): React.ReactElement { return (
{subtitle}
}{field.label}
{event.title}
{event.description &&{event.description}
}{event.timestamp}