import useCuratorUsage from '../../hooks/useCuratorUsage';
import { estimateCost, fmtUsd, fmtTokens } from './pricing';

export default function CuratorUsageFooter() {
    const { usage } = useCuratorUsage(30);
    if (!usage) return null;
    const cost = estimateCost(usage);
    return (
        <div className="curator-usage-footer">
            <span>최근 30일 큐레이터:</span>
            <span>{usage.calls}회 호출</span>
            <span>{fmtTokens(usage.tokens_input + usage.tokens_output)} tokens</span>
            <span>{fmtUsd(cost)}</span>
            <span>캐시 {(usage.cache_hit_rate * 100).toFixed(0)}%</span>
        </div>
    );
}
