import React from 'react';
import {
  StyleProp,
  TouchableOpacity,
  TouchableOpacityProps,
  View,
  ViewStyle,
} from 'react-native';
import Icon from '@components/Icon';
import {Opacity} from '@shared/constants';

import {styles} from './styles';

interface Props {
  onPress: TouchableOpacityProps['onPress'];
  style?: StyleProp<ViewStyle>;
  testID?: string;
  containerStyle?: StyleProp<ViewStyle>;
}

/**
 * @deprecated Use `_HuGo/IconButton` instead
 */
function ImagePicker({onPress, style, testID, containerStyle}: Props) {
  return (
    <TouchableOpacity
      style={[styles.container, containerStyle]}
      activeOpacity={Opacity.HIGH}
      testID={testID}
      onPress={onPress}>
      <View style={[styles.iconContainer, style]}>
        <Icon name="photoCameraFill" size="xs" />
      </View>
    </TouchableOpacity>
  );
}

export default ImagePicker;
