import React, { useEffect } from 'react'; import { useAstroContext } from '../context/AstroContext'; import { ShieldAlert, ArrowRight, ArrowLeft, CheckCircle2, ChevronDown } from 'lucide-react'; import { motion } from 'motion/react'; import { LIFE_AREAS } from '../services/vargaMapping'; export default function Screen3VargaSelection() { const { state, setScreen, setSelectedLifeArea, setSelectedVargas, setStep3Data } = useAstroContext(); // On mount, if no life area is selected, default to the first one (Career) useEffect(() => { if (!state.selectedLifeArea && LIFE_AREAS.length > 0) { handleSelectLifeArea(LIFE_AREAS[0].id); } }, []); const handleSelectLifeArea = (areaId: string) => { const area = LIFE_AREAS.find(a => a.id === areaId); if (area) { setSelectedLifeArea(areaId); setSelectedVargas(area.vargas); } }; const currentArea = LIFE_AREAS.find(a => a.id === state.selectedLifeArea); // Exclude D1 from textareas since D1 data comes from Step 1 const vargasToInput = currentArea ? currentArea.vargas.filter(v => v !== 'D1') : []; const handleProceed = () => { setScreen(4); }; return (

Area of Concern

Step 3 • Varga Selection

Critial Rule: Birth Time Precision

Divisional charts (Vargas) change rapidly—some within mere minutes or seconds. Before proceeding, you must double-check your exact birth time using Jagannatha Hora (JHora). If your birth time is an estimate, skip this micro-lens analysis and rely only on the Step 1 Foundation chart.

What is your primary concern?

Select one life area. The system will automatically select the necessary Vedic D-charts.

{LIFE_AREAS.map((area) => (
handleSelectLifeArea(area.id)} className={`p-5 rounded-2xl border-2 transition-all cursor-pointer ${ state.selectedLifeArea === area.id ? 'border-stone-900 bg-stone-900 text-white shadow-lg' : 'border-stone-200 bg-white hover:border-stone-400 hover:shadow-md' }`} >

{area.label}

{state.selectedLifeArea === area.id && }

{area.description}

Analyzes: {area.vargas.join(' + ')}
))}
{state.selectedLifeArea && (

Provide Micro-Lens Data

D1 Foundation

Always mandatory. This data is automatically sourced from your Step 1 input.

[ Loaded from Context ]
{vargasToInput.map((varga) => (

{varga}

Paste the technical data for {varga} from your software.