import React, { useState } from 'react'; import { View, Text, ScrollView, Switch, StyleSheet } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { useRouter } from 'expo-router'; import { LinearGradient } from 'expo-linear-gradient'; import { Colors, Fonts, FontSize, BorderRadius, Shadows, Spacing } from '@/constants/theme'; import { strategies } from '@/constants/mockData'; import { formatCurrency } from '@/utils/format'; import AnimatedCard from '@/components/AnimatedCard'; import PillBadge from '@/components/PillBadge'; import PressableScale from '@/components/PressableScale'; const RISK_COLORS: Record = { aggressive: { color: Colors.accent.orange, label: 'Aggressive', icon: '\u{1F525}' }, balanced: { color: Colors.accent.green, label: 'Balanced', icon: '\u{2696}\u{FE0F}' }, safe: { color: Colors.accent.blue, label: 'Conservative', icon: '\u{1F6E1}\u{FE0F}' }, }; function StrategyCard({ strategy, index }: { strategy: typeof strategies[0]; index: number }) { const [isActive, setIsActive] = useState(strategy.isActive); const risk = RISK_COLORS[strategy.riskStyle]; const isPositive = strategy.netPnl >= 0; return ( {strategy.name} {strategy.symbols.map(s => ( {s} ))} ${strategy.allocatedCapital.toLocaleString()} allocated Daily Target ${strategy.dailyProgress} / ${strategy.dailyTarget} ); } function StatCell({ label, value, color, mono }: { label: string; value: string; color?: string; mono?: boolean }) { return ( {label} {value} ); } export default function StrategiesScreen() { const insets = useSafeAreaInsets(); const router = useRouter(); return ( STRATEGIES My Strategies {strategies.map((s, i) => ( ))} router.push('/marketplace')} style={styles.ctaWrapper} > EXPLORE MARKETPLACE ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: Colors.background.primary, }, headerSection: { padding: Spacing.screenPadding, paddingBottom: 0, }, sectionLabel: { fontFamily: Fonts.inter.black, fontSize: FontSize.micro, color: Colors.accent.green, letterSpacing: 4, marginBottom: 8, }, pageTitle: { fontFamily: Fonts.inter.black, fontSize: FontSize.hero, color: Colors.text.primary, letterSpacing: -0.5, marginBottom: 16, }, scroll: { flex: 1, }, content: { padding: Spacing.screenPadding, gap: 16, paddingBottom: 120, }, card: { borderRadius: BorderRadius.large, padding: Spacing.cardPaddingLarge, borderWidth: 1, borderColor: Colors.border.default, overflow: 'hidden', gap: 12, }, accentLine: { position: 'absolute', top: 0, left: 0, right: 0, height: 2, opacity: 0.6, }, cardHeader: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', }, stratName: { fontFamily: Fonts.inter.black, fontSize: 18, color: Colors.text.primary, }, statsGrid: { flexDirection: 'row', flexWrap: 'wrap', gap: 10, marginTop: 4, }, statCell: { width: '46%', }, statLabel: { fontFamily: Fonts.inter.black, fontSize: FontSize.micro, color: Colors.text.secondary, letterSpacing: 0.8, marginBottom: 3, }, statValue: { fontFamily: Fonts.inter.extraBold, fontSize: FontSize.bodyLarge, color: Colors.text.primary, }, assetPills: { flexDirection: 'row', gap: 6, flexWrap: 'wrap', }, assetPill: { backgroundColor: 'rgba(255,255,255,0.05)', paddingHorizontal: 10, paddingVertical: 4, borderRadius: BorderRadius.xs, }, assetText: { fontFamily: Fonts.mono.medium, fontSize: FontSize.micro, color: Colors.text.secondary, }, capitalRow: { marginTop: 2, }, capitalLabel: { fontFamily: Fonts.mono.medium, fontSize: FontSize.bodySmall, color: Colors.text.secondary, }, progressSection: { gap: 6, }, progressHeader: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', }, progressLabel: { fontFamily: Fonts.inter.semiBold, fontSize: FontSize.bodySmall, color: Colors.text.secondary, }, progressValue: { fontFamily: Fonts.mono.bold, fontSize: FontSize.bodySmall, color: Colors.text.primary, }, progressTrack: { height: 4, borderRadius: 2, backgroundColor: Colors.background.elevated, overflow: 'hidden', }, progressFill: { height: 4, borderRadius: 2, }, ctaWrapper: { marginTop: 8, borderRadius: 18, shadowColor: 'rgba(0,255,136,0.4)', shadowOffset: { width: 0, height: 12 }, shadowOpacity: 1, shadowRadius: 36, elevation: 8, }, ctaButton: { height: 56, borderRadius: 18, alignItems: 'center', justifyContent: 'center', }, ctaText: { fontFamily: Fonts.inter.black, fontSize: FontSize.bodySmall, color: '#000', letterSpacing: 2, }, });