// withHooks
import { EventHeader } from 'esoftplay/cache/event/header/import';
import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
import { LibStyle } from 'esoftplay/cache/lib/style/import';
import esp from 'esoftplay/esp';

import LottieView from "lottie-react-native";
import React, { useRef } from 'react';
import { Text, View } from 'react-native';


export interface EventTurnstile_settings_statusArgs {

}
export interface EventTurnstile_settings_statusProps {

}
export default function m(props: EventTurnstile_settings_statusProps): any {
  const { msg } = LibNavigation.getArgsAll(props)

  const animation = useRef<LottieView>(null)

  return (
    <View style={{ flex: 1, backgroundColor: LibStyle.colorBgGrey }}>
      <EventHeader title={esp.lang("event/turnstile_settings", "setting_turnstile")} />
      {
        msg &&
        <>
          <View style={{ alignItems: 'center', margin: 15, marginBottom: 0, padding: 10, backgroundColor: '#fff', borderRadius: 10, borderColor: LibStyle.colorGrey, borderWidth: 1 }} >
            <LottieView
              ref={animation}
              loop={true}
              autoPlay
              style={{
                width: LibStyle.width - 100,
                height: LibStyle.width - 100,
              }}
              source={esp.assets('success.json')}
            // OR find more Lottie files @ https://lottiefiles.com/featured
            // Just click the one you like, place that file in the 'assets' folder to the left, and replace the above 'require' statement
            />
          </View>
          <View style={{ margin: 15, padding: 10, backgroundColor: '#fff', borderRadius: 10, borderColor: LibStyle.colorGrey, borderWidth: 1 }}>
            <Text style={{ alignSelf: 'center', textAlign: 'center', fontFamily: 'SFProText', fontWeight: 'bold', fontSize: 30, color: '#4a4a4a' }} >{msg}</Text>
          </View>
        </>
      }
    </View>
  )
}