import { X, Check } from 'lucide-react'; interface RechargeModalProps { user: any; onClose: () => void; onSelectPackage: (amountInRupees: number) => Promise; } export default function RechargeModal({ user, onClose, onSelectPackage }: RechargeModalProps) { // Check if account age is under 3 days (3 * 24 * 60 * 60 * 1000 = 259200000 ms) const isNewUser = (() => { if (!user || !user.createdAt) return false; try { const createdDate = new Date(user.createdAt).getTime(); const currentDate = new Date().getTime(); const ageDiff = currentDate - createdDate; return ageDiff <= 3 * 24 * 60 * 60 * 1000; } catch (e) { return false; } })(); return (

Choose Your Plan

Unlock high-fidelity AI Strategy generations & local ML market predictions.

{/* Card 0: Free Tier */}
Starter

Free Tier

₹0 / week
  • 5 weekly AI strategies
  • Basic candlestick charts
  • Active alerts (Limit: 2)
  • Live stream ticker tape
{/* Card 1: 10 Credits */}
onSelectPackage(500)} style={{ display: 'flex', flexDirection: 'column', padding: '20px', background: 'rgba(255,255,255,0.02)', border: '1px solid var(--border-glass)', borderRadius: '12px', transition: 'all 0.3s ease', cursor: 'pointer', position: 'relative' }}> Analyst Pack

10 Credits

₹500
  • 10 Strategy Generations
  • Advanced indicators scanning
  • Active alerts (Limit: 10)
  • Standard processing queue
{/* Card 2: 50 Credits */}
onSelectPackage(1500)} style={{ display: 'flex', flexDirection: 'column', padding: '20px', background: 'rgba(161, 84, 255, 0.05)', border: '1px solid rgba(161, 84, 255, 0.3)', borderRadius: '12px', transition: 'all 0.3s ease', cursor: 'pointer', position: 'relative', boxShadow: '0 8px 32px rgba(161, 84, 255, 0.1)' }}>
Best Value
Trader Pack

50 Credits

₹1,500
  • 50 Strategy Generations
  • Priority processing queue
  • Active alerts (Limit: 50)
  • Historical strategy history
{/* Card 3: 100 Credits / Lifetime Offer */} {isNewUser ? ( /* Special Lifetime Offer for New Users (Age <= 3 days) */
onSelectPackage(10500)} style={{ display: 'flex', flexDirection: 'column', padding: '20px', background: 'rgba(0, 242, 254, 0.05)', border: '1px solid rgba(0, 242, 254, 0.5)', borderRadius: '12px', transition: 'all 0.3s ease', cursor: 'pointer', position: 'relative', boxShadow: '0 8px 32px rgba(0, 242, 254, 0.15)' }}>
Limited Offer
Lifetime Plan

Unlimited AI

₹10,500 once
  • Lifetime Unlimited AI chats
  • Instant strategy reports
  • Unlimited watchlist & alerts
  • Exclusive developer features
) : ( /* Standard 100 Credits Card */
onSelectPackage(2500)} style={{ display: 'flex', flexDirection: 'column', padding: '20px', background: 'rgba(255,255,255,0.02)', border: '1px solid var(--border-glass)', borderRadius: '12px', transition: 'all 0.3s ease', cursor: 'pointer', position: 'relative' }}> Pro Pack

100 Credits

₹2,500
  • 100 Strategy Generations
  • Dedicated priority agent queue
  • Unlimited price alerts
  • Custom indicator weights
)}

Test Mode active. Pay using Razorpay Test UPI / cards.

{isNewUser && (

⚡ New User Special Offer ends in 3 days!

)}
); }