import React from 'react'; import { View, StyleSheet, Text } from 'react-native'; import Svg, { Circle } from 'react-native-svg'; import { useTheme } from '../theme/context'; import { GradientCard } from './GradientCard'; interface RadialGaugeProps { value: number; max: number; label: string; } export function RadialGauge({ value, max, label }: RadialGaugeProps) { const theme = useTheme(); const size = 80; const stroke = 6; const radius = size / 2 - stroke; const circumference = radius * 2 * Math.PI; const strokeDashoffset = circumference - (value / max) * circumference; const percentage = Math.round((value / max) * 100); return ( {percentage}% {label} ${value} of ${max} saved. ); } const styles = StyleSheet.create({ container: { padding: 16, marginBottom: 16, }, content: { flexDirection: 'row', alignItems: 'center', }, gaugeContainer: { position: 'relative', width: 80, height: 80, }, centerText: { ...StyleSheet.absoluteFillObject, alignItems: 'center', justifyContent: 'center', }, percentText: { fontSize: 16, fontWeight: '800', color: 'white', }, infoContainer: { flex: 1, marginLeft: 16, }, label: { fontSize: 16, fontWeight: '700', marginBottom: 2, }, subText: { fontSize: 12, lineHeight: 16, }, });