import {RootState} from '@redux/store';
import {ReactNode} from 'react';
import {
  AccessibilityRole,
  GestureResponderEvent,
  StyleProp,
  TouchableOpacity,
  TouchableOpacityProps,
  ViewStyle,
} from 'react-native';
import {useSelector} from 'react-redux';

interface CustomTouchableProps extends TouchableOpacityProps {}

export function MyTouchableOpacity({children, ...rest}: CustomTouchableProps) {
  const currentTheme = useSelector(
    (state: RootState) => state.nonSaveVariables.theme.opacity,
  );

  return (
    <TouchableOpacity activeOpacity={currentTheme[80]} {...rest}>
      {children}
    </TouchableOpacity>
  );
}
