// withHooks
// noPage

import { LibIcon } from 'esoftplay/cache/lib/icon/import';
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
import { MarketStyle } from 'esoftplay/cache/market/style/import';

import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';


export interface MarketProduct_discuss_product_itemArgs {

}
export interface MarketProduct_discuss_product_itemProps {
  checked: number,
  image?: string,
  id: string,
  cat_id: string,
  title: string,
  sale: string,
  sale_max: string,
  stocks: string,
  sold: string,
  rating: string,
  rating_value: string,
  rating_count: string,
  publish: string,
  active: string,
  alert: string,

  onPress: () => any,
}
export default function m(props: MarketProduct_discuss_product_itemProps): any {
  return (
    <TouchableOpacity onPress={() => { props.onPress() }} style={styleId_Z1zJeEx}>
      <TouchableOpacity onPress={() => { props.onPress() }}>
        <LibIcon name={props?.checked == 1 ? "checkbox-marked-outline" : "checkbox-blank-outline"} color={MarketStyle.colorPrimaryMarket} />
      </TouchableOpacity>
      <LibPicture source={{ uri: props?.image }} style={styleId_ZmusG5} resizeMode="cover" />
      <View style={{ flex: 1 }}>
        <Text allowFontScaling={false} style={styleId_cP8sW} >{props?.title}</Text>
        <Text allowFontScaling={false} style={styleId_1UsGmI} >{LibUtils.money(props?.sale)}</Text>
      </View>
    </TouchableOpacity>
  )
}
const styleId_Z1zJeEx: any = { flexDirection: 'row', padding: 10, paddingHorizontal: 15, alignContent: 'center', alignItems: 'center', borderBottomWidth: 1, borderBottomColor: '#e6e6e6' }
const styleId_ZmusG5: any = { marginHorizontal: 10, borderRadius: 5, height: 60, width: 60 }
const styleId_cP8sW: any = { fontSize: 12, fontWeight: "normal", fontStyle: "normal", letterSpacing: 0 }
const styleId_1UsGmI: any = { marginTop: 5, fontSize: 16, fontWeight: "bold", fontStyle: "normal", letterSpacing: 0, color: '#000' }