'use client';

/**
 * Hook that returns theme-aware colors for Recharts components.
 * Reads the current theme mode and returns appropriate axis/grid colors.
 */

import { useThemeStore } from '@/lib/stores/theme-store';

export function useChartTheme() {
  const mode = useThemeStore((s) => s.mode);

  return {
    tickColor: mode === 'light' ? '#6b7280' : '#a0a0a0',
    gridColor: mode === 'light' ? 'rgba(0,0,0,0.08)' : 'rgba(255,255,255,0.05)',
    axisColor: mode === 'light' ? 'rgba(0,0,0,0.15)' : 'rgba(255,255,255,0.1)',
    legendColor: mode === 'light' ? '#6b7280' : '#a0a0a0',
  };
}
