import React, { useState } from 'react'; import { Eye, EyeOff } from 'lucide-react'; interface SetupPanelProps { onComplete: (apiKey: string) => void; hasServerKey: boolean; } export default function SetupPanel({ onComplete, hasServerKey }: SetupPanelProps) { const [key, setKey] = useState(''); const [show, setShow] = useState(false); const handleSubmit = () => { if (hasServerKey) { onComplete(''); return; } if (key.trim().length > 10) onComplete(key.trim()); }; return (
{/* Logo */}
Equity Research Pro

Institutional-grade equity analysis for Indian listed companies

{/* Card */}
{hasServerKey ? (
Server Key Detected

A Gemini API key has been configured on the server. You can begin analysis immediately.

) : (
Gemini API Key

Enter your Google Gemini 2.5 Flash API key. It stays in your browser session only and is never stored on any server.{' '} Get one free →

setKey(e.target.value)} onKeyDown={e => e.key === 'Enter' && handleSubmit()} placeholder="AIza..." autoComplete="off" style={{ width: '100%', padding: '10px 38px 10px 14px', background: 'var(--bg-card)', border: '1px solid var(--border-bright)', borderRadius: 9, color: 'var(--text-primary)', fontSize: 13, fontFamily: 'var(--font-mono)', outline: 'none', }} />
)}

Supports Banking · NBFC · IT · Pharma · FMCG · Auto · Metal · Infra · Energy

); }