// withHooks

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


export interface EventSectionArgs {

}
export interface EventSectionProps {
  text: string,
  textColor: string,
  caption?: string,
  icon?: string,
  moreAction?: () => void
}
export default function m(props: EventSectionProps): any {
  return (
    <View style={{ marginLeft: 4, marginVertical: 5, flexDirection: 'row', alignItems: 'center' }} >
      <View style={{ width: 8, height: 28, borderRadius: 10, backgroundColor: "#ededed" }} />
      <View style={{ marginLeft: 12, flex: 1 }} >
        <Text allowFontScaling={false} style={{ fontFamily: "ArialBold", fontSize: 15, lineHeight: 22, color: props.textColor }} >{props.text}</Text>
        {props.caption && <Text allowFontScaling={false} style={{ fontFamily: "Arial", fontSize: 10, color: "#b8b8b8" }} >{props.caption}</Text>}
      </View>
      {
        props.icon &&
        <TouchableOpacity onPress={() => props.moreAction ? props.moreAction() : {}} >
          <LibPicture style={{ height: 25, width: 25, resizeMode: 'contain' }} source={esp.assets(props.icon)} />
        </TouchableOpacity>
      }
    </View>
  )
}