File size: 7,048 Bytes
4c1e4ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
import React from 'react';
import { 
  Grid3X3, 
  BarChart3, 
  PlayCircle, 
  Trophy, 
  Settings,
  Calculator,
  TrendingUp,
  Target,
  Eye,
  Database,
  Search,
  HelpCircle
} from 'lucide-react';

interface SidebarProps {
  activeSection: string;
  onSectionChange: (section: string) => void;
  gameStats: {
    currentGame: number;
    totalGames: number;
    remainingGames: number;
  };
}

const Sidebar: React.FC<SidebarProps> = ({ 
  activeSection, 
  onSectionChange,
  gameStats 
}) => {
  const menuItems = [
    {
      id: 'real-comparison',
      title: 'Comparação Real',
      icon: Search,
      description: '100% dados verdadeiros',
      badge: 'REAL'
    },
    {
      id: 'dual-visualizer',
      title: 'Visualizador Dual',
      icon: Eye,
      description: 'Jogos verticais e horizontais',
      badge: gameStats.currentGame
    },
    {
      id: 'grid',
      title: 'Grid Interativo',
      icon: Grid3X3,
      description: 'Visualizar padrões',
    },
    {
      id: 'statistics',
      title: 'Estatísticas',
      icon: BarChart3,
      description: 'Análises detalhadas',
    },
    {
      id: 'results-analysis',
      title: 'Análise de Resultados',
      icon: Trophy,
      description: 'Comparar com sorteios oficiais',
    },
    {
      id: 'calculator',
      title: 'Calculadora',
      icon: Calculator,
      description: 'Cálculos de jogos',
      badge: gameStats.totalGames
    },
    {
      id: 'probability',
      title: 'Probabilidades',
      icon: Target,
      description: 'Chances de acerto',
    },
    {
      id: 'lotomania-features',
      title: 'Funcionalidades',
      icon: HelpCircle,
      description: 'Conhecer a Lotomania',
    },
    {
      id: 'patterns',
      title: 'Análise de Padrões',
      icon: TrendingUp,
      description: 'Padrões e tendências',
    },
    {
      id: 'simulator',
      title: 'Simulador Avançado',
      icon: PlayCircle,
      description: 'Simular apostas',
    },
    {
      id: 'settings',
      title: 'Configurações',
      icon: Settings,
      description: 'Preferências do sistema',
    }
  ];

  return (
    <div className="bg-white border-r border-gray-200 w-64 min-h-screen shadow-lg flex flex-col relative">
      {/* Header */}
      <div className="p-6 border-b border-gray-200 bg-gradient-to-r from-blue-600 to-blue-700 flex-shrink-0">
        <h1 className="text-xl font-bold text-white mb-1">
          Lotomania Pro
        </h1>
        <p className="text-blue-100 text-sm">
          Estratégia Inteligente
        </p>
      </div>

      {/* Stats Overview */}
      <div className="p-4 bg-gray-50 border-b border-gray-200 flex-shrink-0">
        <div className="grid grid-cols-1 gap-3">
          <div className="bg-white p-3 rounded-lg shadow-sm border">
            <div className="flex items-center justify-between">
              <span className="text-xs font-medium text-gray-600">Jogo Atual</span>
              <Database className="w-4 h-4 text-blue-500" />
            </div>
            <div className="text-lg font-bold text-gray-900">
              {gameStats.currentGame}
            </div>
          </div>
          
          <div className="bg-white p-3 rounded-lg shadow-sm border">
            <div className="flex items-center justify-between">
              <span className="text-xs font-medium text-gray-600">Total de Jogos</span>
              <Calculator className="w-4 h-4 text-green-500" />
            </div>
            <div className="text-lg font-bold text-gray-900">
              {gameStats.totalGames}
            </div>
          </div>
          
          <div className="bg-white p-3 rounded-lg shadow-sm border">
            <div className="flex items-center justify-between">
              <span className="text-xs font-medium text-gray-600">Restantes</span>
              <Target className="w-4 h-4 text-orange-500" />
            </div>
            <div className="text-lg font-bold text-gray-900">
              {gameStats.remainingGames}
            </div>
          </div>
        </div>
      </div>

      {/* Progress Bar */}
      <div className="p-4 border-b border-gray-200 flex-shrink-0">
        <div className="mb-2">
          <div className="flex justify-between text-sm text-gray-600 mb-1">
            <span>Progresso</span>
            <span>{Math.round((gameStats.currentGame / gameStats.totalGames) * 100)}%</span>
          </div>
          <div className="w-full bg-gray-200 rounded-full h-2">
            <div 
              className="bg-blue-600 h-2 rounded-full transition-all duration-300"
              style={{ 
                width: `${Math.min((gameStats.currentGame / gameStats.totalGames) * 100, 100)}%` 
              }}
            ></div>
          </div>
        </div>
      </div>

      {/* Navigation Menu - Flex grow para ocupar espaço disponível */}
      <nav className="p-2 flex-1 overflow-y-auto">
        <div className="space-y-1">
          {menuItems.map((item) => {
            const Icon = item.icon;
            const isActive = activeSection === item.id;
            
            return (
              <button
                key={item.id}
                onClick={() => onSectionChange(item.id)}
                className={`
                  w-full flex items-center justify-between p-3 rounded-lg transition-all duration-200
                  ${isActive 
                    ? 'bg-blue-100 text-blue-700 border-r-4 border-blue-600' 
                    : 'text-gray-700 hover:bg-gray-100 hover:text-blue-600'
                  }
                `}
              >
                <div className="flex items-center space-x-3">
                  <Icon className={`w-5 h-5 ${isActive ? 'text-blue-600' : 'text-gray-500'}`} />
                  <div className="text-left">
                    <div className="text-sm font-medium">
                      {item.title}
                    </div>
                    <div className="text-xs text-gray-500">
                      {item.description}
                    </div>
                  </div>
                </div>
                
                {item.badge && (
                  <span className={`
                    px-2 py-1 text-xs font-semibold rounded-full
                    ${isActive 
                      ? 'bg-blue-200 text-blue-800' 
                      : 'bg-gray-200 text-gray-700'
                    }
                  `}>
                    {item.badge}
                  </span>
                )}
              </button>
            );
          })}
        </div>
      </nav>

      {/* Footer - Fixo na parte inferior */}
      <div className="p-3 border-t border-gray-200 bg-gray-50 flex-shrink-0 mt-auto">
        <div className="text-center">
          <p className="text-xs text-gray-500 mb-1">
            Versão 1.0.0
          </p>
          <p className="text-xs text-gray-400">
            Desenvolvido com ❤️
          </p>
        </div>
      </div>
    </div>
  );
};

export default Sidebar;