import React from 'react'; import { TouchableOpacity, View, Text } from 'react-native'; import Animated, { useSharedValue, useAnimatedStyle, withSpring, interpolate, } from 'react-native-reanimated'; interface PhotoButtonProps { onPress: () => void; disabled?: boolean; isCapturing?: boolean; } const AnimatedTouchableOpacity = Animated.createAnimatedComponent(TouchableOpacity); export const PhotoButton: React.FC = ({ onPress, disabled = false, isCapturing = false, }) => { const pressed = useSharedValue(false); const animatedStyle = useAnimatedStyle(() => { const scale = interpolate(pressed.value ? 1 : 0, [0, 1], [1, 0.9]); return { transform: [{ scale: withSpring(scale) }], }; }); const handlePressIn = () => { if (!disabled) { pressed.value = true; } }; const handlePressOut = () => { pressed.value = false; }; return ( {/* Outer Ring */} {/* Inner Circle */} {isCapturing && ( )} {isCapturing && Capturing...} ); };