import { Download } from 'lucide-react';
import { cn } from '@/lib/utils';
import type { ChartType, TimeRange } from '@/lib/types';
import { Button } from '@/components/ui/button';
type ChartToolbarProps = {
chartType: ChartType;
timeRange: TimeRange;
onChartTypeChange: (type: ChartType) => void;
onTimeRangeChange: (range: TimeRange) => void;
onExport: () => void;
};
const TIME_RANGES: TimeRange[] = ['1W', '1M', '3M', '1Y', '3Y', '5Y', '10Y', '20Y'];
const CHART_TYPES: { value: ChartType; label: string }[] = [
{ value: 'line', label: 'Line' },
{ value: 'combination', label: 'Compare' }
];
export function ChartToolbar({
chartType,
timeRange,
onChartTypeChange,
onTimeRangeChange,
onExport
}: ChartToolbarProps) {
return (
{TIME_RANGES.map((range) => (
))}
{CHART_TYPES.map((type) => (
))}
);
}