import { useState, useEffect } from 'react'; import { Award, Zap, Shield, Users, ChevronRight } from 'lucide-react'; interface FoundryAppProps { openIframeWindow?: (url: string, title: string) => void; } export function FoundryApp({ openIframeWindow }: FoundryAppProps) { const [viewMode, setViewMode] = useState<'info' | 'enroll'>('info'); const [promoCode, setPromoCode] = useState(''); const [promoApplied, setPromoApplied] = useState(false); const basePrice = 500; const discount = promoApplied && promoCode.toUpperCase() === 'TERMINAL10' ? 0.10 : 0; const finalPrice = basePrice * (1 - discount); useEffect(() => { fetch('/api/track/event', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ event_type: 'foundry_open', source: 'foundry-app', timestamp: new Date().toISOString() }) }).catch(() => {}); }, []); return (
FOUNDRY.EXE
{viewMode === 'info' ? (

The Foundry

Train to become a certified Metaverse Architect. Learn the protocols. Join the network.

8-week intensive curriculum
AeThex Passport certification
Join the architect network
Hint: Check the terminal for secret codes
) : (

Architect Bootcamp

Cohort Starting Soon

Bootcamp Access ${basePrice}
{promoApplied && discount > 0 && (
Discount (TERMINAL10) -${(basePrice * discount).toFixed(0)}
)}
Total ${finalPrice.toFixed(0)}
setPromoCode(e.target.value)} placeholder="Enter code" className="flex-1 bg-black/50 border border-yellow-500/30 px-3 py-2 text-white text-sm focus:outline-none focus:border-yellow-500" />
{promoApplied && promoCode.toUpperCase() === 'TERMINAL10' && (

Code applied! 10% discount.

)} {promoApplied && promoCode && promoCode.toUpperCase() !== 'TERMINAL10' && (

Invalid code. Try the terminal.

)}

Opens enrollment form

)}
); }