import React from 'react' import { Upload, Download, Trash2, MousePointer, Minus, ArrowUpDown, Square, TrendingUp, Sun, Moon, Type, Settings } from 'lucide-react' import { Button } from './ui/button' import { Separator } from './ui/separator' import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './ui/tooltip' const Sidebar = ({ onFileUpload, onReset, activeTool, setActiveTool, theme, setTheme, chartType, setChartType, currentSymbol, symbolData, onDownloadSample, onNavigateToDate }) => { const [dateInput, setDateInput] = React.useState('') const fileInputRef = React.useRef(null) const tools = [ { id: 'cursor', icon: MousePointer, label: 'Курсор' }, { id: 'horizontal', icon: Minus, label: 'Горизонтальна лінія' }, { id: 'vertical', icon: ArrowUpDown, label: 'Вертикальна лінія' }, { id: 'rectangle', icon: Square, label: 'Прямокутник' }, { id: 'fibonacci', icon: TrendingUp, label: 'Фібоначчі' }, ] const chartTypes = [ { id: 'candlestick', label: 'Свічки' }, { id: 'line', label: 'Лінія' }, { id: 'area', label: 'З областю' }, ] const handleFileChange = (e) => { const file = e.target.files?.[0] if (file) onFileUpload(file) e.target.value = '' } const handleNavigate = () => { if (dateInput) { onNavigateToDate(dateInput) setDateInput('') } } return (

Дані

Тип графіка

{chartTypes.map((type) => ( ))}

Інструменти малювання

{tools.map((tool) => (

{tool.label}

))}

Навігація

setDateInput(e.target.value)} className="flex-1 h-9 rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50" />

Налаштування

{currentSymbol ? ( {currentSymbol} ) : ( Немає даних )}
{symbolData && (
O: {symbolData.open?.toFixed(2)} H: {symbolData.high?.toFixed(2)} L: {symbolData.low?.toFixed(2)} C: {symbolData.close?.toFixed(2)}
)}
) } export default Sidebar