import React, { useEffect, useRef } from 'react';
import { View, StyleSheet, Animated } from 'react-native';
import { useTheme } from '../../contexts/theme';
const slideTiming = {
  toValue: -15,
  duration: 1200,
  useNativeDriver: true
};
const fadeTiming = {
  toValue: 1,
  duration: 600,
  useNativeDriver: true
};
const animationDelay = 300;
const CredentialAdded = () => {
  const {
    Assets
  } = useTheme();
  const cardFadeAnim = useRef(new Animated.Value(0));
  const checkFadeAnim = useRef(new Animated.Value(0));
  const tranAnim = useRef(new Animated.Value(-90));
  const style = StyleSheet.create({
    container: {
      flexDirection: 'column'
    },
    back: {
      backgroundColor: 'transparent',
      position: 'absolute',
      marginTop: -30
    },
    front: {
      backgroundColor: 'transparent'
    },
    card: {
      backgroundColor: 'transparent',
      position: 'absolute',
      marginLeft: 10
    },
    check: {
      alignItems: 'center',
      marginBottom: 10
    }
  });
  useEffect(() => {
    setTimeout(() => {
      Animated.sequence([Animated.timing(cardFadeAnim.current, fadeTiming), Animated.timing(tranAnim.current, slideTiming), Animated.timing(checkFadeAnim.current, fadeTiming)]).start();
    }, animationDelay);
  }, []);
  return /*#__PURE__*/React.createElement(View, {
    style: style.container
  }, /*#__PURE__*/React.createElement(Animated.View, {
    style: [{
      opacity: checkFadeAnim.current
    }, style.check]
  }, /*#__PURE__*/React.createElement(Assets.svg.checkInCircle, {
    height: 45,
    width: 45
  })), /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Assets.svg.walletBack, {
    style: style.back,
    height: 110,
    width: 110
  }), /*#__PURE__*/React.createElement(Animated.View, {
    style: {
      opacity: cardFadeAnim.current,
      transform: [{
        translateY: tranAnim.current
      }]
    }
  }, /*#__PURE__*/React.createElement(Assets.svg.credentialCard, {
    style: style.card,
    height: 110,
    width: 110
  })), /*#__PURE__*/React.createElement(Assets.svg.walletFront, {
    style: style.front,
    height: 140,
    width: 140
  })));
};
export default CredentialAdded;
//# sourceMappingURL=CredentialAdded.js.map