import type { LucideIcon } from 'lucide-react';
import { KpiTile } from './kpi-tile';

/**
 * The original stat card, kept as a thin wrapper so older screens keep their
 * call sites while sharing the current tile design.
 *
 * New work should use KpiTile directly, which also supports trends, deltas and
 * footers.
 */
export function StatCard({
    label,
    value,
    hint,
    icon,
    href,
    tone = 'default',
}: {
    label: string;
    value: string | number;
    hint?: string | null;
    icon?: LucideIcon;
    href?: string;
    tone?: 'default' | 'warning' | 'danger' | 'success';
}) {
    const resolvedTone =
        tone === 'default'
            ? 'slate'
            : tone === 'warning'
              ? 'warning'
              : tone === 'danger'
                ? 'danger'
                : 'success';

    return (
        <KpiTile
            label={label}
            value={value}
            hint={hint}
            icon={icon}
            href={href}
            tone={resolvedTone}
        />
    );
}
