"use strict";

import { View, Text } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import GroupedPillButtons from '../../components/internal/GroupedPillButtons';
import { useI18n } from '../../hooks/useI18n';
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
const RecoverSuccessStep = ({
  colors,
  styles,
  navigate,
  allStepData,
  successMessage
}) => {
  const {
    t
  } = useI18n();
  // Extract identifier from previous steps
  const requestData = allStepData[0] || {};
  const {
    identifier
  } = requestData;
  const handleContinueToReset = () => {
    // Navigate back to SignIn and let host app open its reset flow
    navigate('SignIn', {
      showReset: true,
      identifier
    });
  };
  const handleBackToSignIn = () => {
    navigate('SignIn');
  };
  return /*#__PURE__*/_jsxs(_Fragment, {
    children: [/*#__PURE__*/_jsx(View, {
      style: {
        alignItems: 'center',
        justifyContent: 'center',
        marginBottom: 32
      },
      children: /*#__PURE__*/_jsx(View, {
        style: {
          width: 80,
          height: 80,
          borderRadius: 40,
          backgroundColor: colors.success + '20',
          alignItems: 'center',
          justifyContent: 'center',
          marginBottom: 24
        },
        children: /*#__PURE__*/_jsx(Ionicons, {
          name: "checkmark-circle",
          size: 40,
          color: colors.success
        })
      })
    }), /*#__PURE__*/_jsxs(View, {
      style: styles.modernHeader,
      children: [/*#__PURE__*/_jsx(Text, {
        style: [styles.modernTitle, {
          color: colors.text
        }],
        children: t('recover.title')
      }), /*#__PURE__*/_jsx(Text, {
        style: [styles.modernSubtitle, {
          color: colors.secondaryText
        }],
        children: successMessage || t('recover.resetSuccess')
      })]
    }), /*#__PURE__*/_jsxs(View, {
      style: styles.modernInputContainer,
      children: [/*#__PURE__*/_jsxs(View, {
        style: {
          padding: 20,
          backgroundColor: colors.inputBackground,
          borderRadius: 16,
          borderWidth: 1,
          borderColor: colors.border,
          marginBottom: 24
        },
        children: [/*#__PURE__*/_jsx(Text, {
          style: [styles.footerText, {
            color: colors.text,
            fontSize: 16,
            marginBottom: 8
          }],
          children: t('recover.whatsNextTitle') || "What's next?"
        }), /*#__PURE__*/_jsx(Text, {
          style: [styles.footerText, {
            color: colors.secondaryText,
            fontSize: 14,
            lineHeight: 20
          }],
          children: t('recover.whatsNextBody') || 'You can now reset your password or return to sign in with your existing credentials.'
        })]
      }), /*#__PURE__*/_jsxs(View, {
        style: {
          flexDirection: 'row',
          alignItems: 'center',
          padding: 12,
          backgroundColor: colors.success + '10',
          borderRadius: 8,
          borderWidth: 1,
          borderColor: colors.success + '30'
        },
        children: [/*#__PURE__*/_jsx(Ionicons, {
          name: "shield-checkmark",
          size: 20,
          color: colors.success,
          style: {
            marginRight: 8
          }
        }), /*#__PURE__*/_jsx(Text, {
          style: [styles.footerText, {
            color: colors.success,
            fontSize: 14,
            flex: 1
          }],
          children: successMessage || t('recover.completeSecure') || 'Your account recovery is complete and secure.'
        })]
      })]
    }), /*#__PURE__*/_jsx(GroupedPillButtons, {
      buttons: [{
        text: t('common.actions.signIn'),
        onPress: handleBackToSignIn,
        icon: 'arrow-back',
        variant: 'transparent'
      }],
      colors: colors
    })]
  });
};
export default RecoverSuccessStep;
//# sourceMappingURL=RecoverSuccessStep.js.map