// withHooks

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


export interface EventMessageArgs {

}
export interface EventMessageProps {
  message: string,
  children?: any,
  style?: any
  textStyle?: any
}
export default function m(props: EventMessageProps): any {

  return (
    <View style={[{ flex: 1, alignItems: 'center', justifyContent: 'center' }, props.style]}>
      <View style={{ justifyContent: 'center', alignItems: 'center', padding: 10 }}>
        <LibPicture source={esp.assets('img_failed_msg.png')} style={{ width: LibStyle.width * 0.8, height: 150, resizeMode: 'contain' }} />
        <View style={{ width: LibStyle.width - 40, justifyContent: 'center', alignItems: 'center', padding: 10, borderRadius: 10, marginTop: 10 }}>
          <Text allowFontScaling={false} style={[{ flexWrap: 'wrap', fontSize: 14, lineHeight: 20, fontWeight: "bold", marginBottom: 5, color: "#4a4a4a", textAlign: "center" }, props.textStyle]}>{props.message}</Text>
        </View>
      </View>
      {props.children}
    </View>
  )
}