'use client'; import { Flame, CheckCircle2, Circle } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Progress } from '@/components/ui/progress'; interface HabitCardProps { habit: { id: string; name: string; description?: string; frequency: 'daily' | 'weekly' | 'custom'; current_streak: number; best_streak: number; score: number; completion_mode: 'quick' | 'detailed'; domain: string; logged_today: boolean; }; onComplete: () => void; } export function HabitCard({ habit, onComplete }: HabitCardProps) { return (
{habit.name} {habit.description && (

{habit.description}

)}
{habit.domain}
{/* Streak info */}
Best: {habit.best_streak}
{/* Score */}
Score {habit.score}/100
{/* Frequency badge */}
{habit.frequency} {habit.completion_mode}
{/* Complete button */}
); }