import * as ProgressPrimitive from '@rn-primitives/progress'; import * as React from 'react'; import { Platform, View } from 'react-native'; import Animated, { Extrapolation, interpolate, useAnimatedStyle, useDerivedValue, withSpring, } from 'react-native-reanimated'; import { cn } from '../../lib/utils'; function Progress({ className, value, indicatorClassName, ...props }: ProgressPrimitive.RootProps & { ref?: React.RefObject; indicatorClassName?: string; }) { return ( ); } export { Progress }; function Indicator({ value, className, }: { value: number | undefined | null; className?: string; }) { const progress = useDerivedValue(() => value ?? 0); const indicator = useAnimatedStyle(() => { return { width: withSpring( `${interpolate(progress.value, [0, 100], [1, 100], Extrapolation.CLAMP)}%`, { overshootClamping: true }, ), }; }); if (Platform.OS === 'web') { return ( ); } return ( ); }