'use client'; import { Button } from '@contractspec/lib.design-system'; import { Card, CardContent } from '@contractspec/lib.ui-kit-web/ui/card'; import { cn } from '@contractspec/lib.ui-kit-web/ui/utils'; import type { JourneyStepSpec } from '@contractspec/module.learning-journey/track-spec'; interface TipCardProps { step: JourneyStepSpec; isCompleted: boolean; isCurrent: boolean; onComplete?: () => void; onDismiss?: () => void; } const TIP_ICONS: Record = { cash_buffer_too_high: '💰', no_savings_goal: '🎯', irregular_savings: '📅', noise_late_evening: '🔇', guest_frequency_high: '👥', shared_space_conflicts: '🏠', default: '💡', }; export function TipCard({ step, isCompleted, isCurrent, onComplete, onDismiss, }: TipCardProps) { const tipId = (step.metadata?.tipId as string) ?? 'default'; const icon = TIP_ICONS[tipId] ?? TIP_ICONS.default; return (
{/* Icon */}
{isCompleted ? '✓' : icon}
{/* Content */}

{step.title}

{step.xpReward && ( +{step.xpReward} XP )}

{step.description}

{/* Actions */} {!isCompleted && (
)} {isCompleted && (

✓ Tip acknowledged

)}
); }