// withHooks

import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
import { LibPicture } from 'esoftplay/cache/lib/picture/import';
import { LibStyle } from 'esoftplay/cache/lib/style/import';
import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
import esp from 'esoftplay/esp';
import React from 'react';
import { ScrollView, TouchableOpacity, View } from 'react-native';


export interface EventBlock_invitationArgs {

}
export interface EventBlock_invitationProps {

}
export default function m(props: EventBlock_invitationProps): any {
  const { dataCheck } = LibNavigation.getArgsAll(props)
  return (
    <View style={{ flex: 1 }}>
      <View style={{ flex: 1 }}>
        <LibPicture source={esp.assets('failed.png')} style={{ flex: 1, height: LibStyle.height, width: LibStyle.width }} /* resizeMode={"stretch"} */ />
      </View>
      <View style={{ position: 'absolute', top: LibStyle.STATUSBAR_HEIGHT + 17, left: 0, right: 0, bottom: 0 }} >
        <View style={{ flexDirection: 'row', padding: 15, marginBottom: 15 }}>
          <TouchableOpacity hitSlop={{ top: 4, bottom: 4, left: 4, right: 4 }} onPress={() => LibNavigation.back()} >
            <LibPicture style={{ height: 35, width: 35 }} source={esp.assets('icons/ic_header_back.png')} />
          </TouchableOpacity>
        </View>
        <ScrollView >
          <View style={{ marginBottom: 20, alignSelf: 'center', borderRadius: LibStyle.width / 3, padding: 10, backgroundColor: '#fff' }}>
            <LibPicture
              source={esp.assets('failed_icon.png')}
              style={{ width: LibStyle.width / 3, height: LibStyle.width / 3 }}
            />
          </View>
          <LibTextstyle textStyle='m_overline' text={esp.lang("event/block_invitation", "cannot_claim_code")} style={{ lineHeight: 20, color: '#fff', fontSize: 16, margin: 15, fontWeight: 'bold', marginBottom: 0, textAlign: 'center' }} />
          <LibTextstyle textStyle='m_overline' text={esp.lang("event/block_invitation", "try_again_later") + LibUtils.moment(dataCheck?.lock_end).serverFormat("DD MMM YYYY HH:mm:ss")} style={{ lineHeight: 20, color: '#fff', fontSize: 16, margin: 15, fontWeight: 'bold', marginBottom: 0, textAlign: 'center' }} />

        </ScrollView>

      </View>

    </View>
  )
}