// withHooks

import { LibPicture } from 'esoftplay/cache/lib/picture/import';
import { LibStyle } from 'esoftplay/cache/lib/style/import';
import React from 'react';
import { TouchableOpacity, View } from 'react-native';


export interface EventItemArgs {

}
export interface EventItemProps {
  created?: string,
  currency?: string,
  description?: string,
  discount?: string,
  hits?: string,
  id?: string,
  image: string,
  images?: any,
  price?: string,
  sale?: string,
  title?: string,
  url?: string,
  test_ID?: string,
  onPress: () => void
}
export default function m(props: EventItemProps): any {
  const itemWidth = (LibStyle.width - 36.5) * 0.5
  const itemHeigth = itemWidth / 1366 * 768

  return (
    <TouchableOpacity testID={props?.test_ID} onPress={props.onPress} >
      <View style={[{ width: itemWidth, borderRadius: 5, backgroundColor: 'white', margin: 4, alignItems: "center", overflow: 'hidden' }, LibStyle.elevation(2)]} >
        <LibPicture source={{ uri: props.image }} style={{ height: itemHeigth, width: itemWidth, resizeMode: 'cover', backgroundColor: "#f1f2f3" }} />
      </View>
    </TouchableOpacity>
  )
}