import React, { useState } from 'react'; import { Play, Sparkles, AlertCircle, CheckCircle2, ChevronRight, Loader2 } from 'lucide-react'; // fix: removed .ts extension from imports to follow project pattern and resolved missing member error import { runSimulationForecast } from '../services/geminiService'; import { SimulationResult } from '../types/index'; const ScenarioButton = ({ label, description, onClick }: any) => ( ); const Simulation: React.FC = () => { const [prompt, setPrompt] = useState(''); const [loading, setLoading] = useState(false); const [result, setResult] = useState(null); const handleRun = async (overridePrompt?: string) => { const finalPrompt = overridePrompt || prompt; if (!finalPrompt) return; setLoading(true); const data = await runSimulationForecast(finalPrompt); setResult(data); setLoading(false); }; return (

Gemini Oracle Simulation

Simulate complex market shifts, regulatory shocks, or internal expenditure reallocations using neural financial forecasting.

{result && (

Simulation Results

REF: {result.simulationId}

Confidence Score

{Math.round(result.confidenceScore * 100)}%

Neural Narrative

"{result.outcomeNarrative}"

Projected Portfolio Value (12M)

${result.projectedValue?.toLocaleString()}

Risk Exposure

Elevated

Resilience Rating

AA-
)}
); }; export default Simulation;