"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
var _theme = require("../../contexts/theme");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
const slideTiming = {
  toValue: -15,
  duration: 1200,
  useNativeDriver: true
};
const fadeTiming = {
  toValue: 1,
  duration: 600,
  useNativeDriver: true
};
const animationDelay = 300;
const CredentialAdded = () => {
  const {
    Assets
  } = (0, _theme.useTheme)();
  const cardFadeAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0));
  const checkFadeAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0));
  const tranAnim = (0, _react.useRef)(new _reactNative.Animated.Value(-90));
  const style = _reactNative.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
    }
  });
  (0, _react.useEffect)(() => {
    setTimeout(() => {
      _reactNative.Animated.sequence([_reactNative.Animated.timing(cardFadeAnim.current, fadeTiming), _reactNative.Animated.timing(tranAnim.current, slideTiming), _reactNative.Animated.timing(checkFadeAnim.current, fadeTiming)]).start();
    }, animationDelay);
  }, []);
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: style.container
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
    style: [{
      opacity: checkFadeAnim.current
    }, style.check]
  }, /*#__PURE__*/_react.default.createElement(Assets.svg.checkInCircle, {
    height: 45,
    width: 45
  })), /*#__PURE__*/_react.default.createElement(_reactNative.View, null, /*#__PURE__*/_react.default.createElement(Assets.svg.walletBack, {
    style: style.back,
    height: 110,
    width: 110
  }), /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
    style: {
      opacity: cardFadeAnim.current,
      transform: [{
        translateY: tranAnim.current
      }]
    }
  }, /*#__PURE__*/_react.default.createElement(Assets.svg.credentialCard, {
    style: style.card,
    height: 110,
    width: 110
  })), /*#__PURE__*/_react.default.createElement(Assets.svg.walletFront, {
    style: style.front,
    height: 140,
    width: 140
  })));
};
var _default = exports.default = CredentialAdded;
//# sourceMappingURL=CredentialAdded.js.map