@oxyhq/services
Version:
Reusable OxyHQ module to handle authentication, user management, karma system, device-based session management and more 🚀
138 lines (135 loc) • 5 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
var _GroupedPillButtons = _interopRequireDefault(require("../../components/internal/GroupedPillButtons"));
var _components = require("../../components");
var _useI18n = require("../../hooks/useI18n");
var _spacing = require("../../styles/spacing");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const SignUpSummaryStep = ({
colors,
styles,
theme,
nextStep,
prevStep,
allStepData,
isLoading
}) => {
const {
t
} = (0, _useI18n.useI18n)();
const baseStyles = _spacing.stepStyles;
// Extract data from previous steps
const identityData = allStepData[1] || {}; // Step 2 (index 1)
const securityData = allStepData[2] || {}; // Step 3 (index 2)
const {
username = '',
email = ''
} = identityData;
const {
password = ''
} = securityData;
// Check if all required data is available
const hasValidData = username && email && password;
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
style: [baseStyles.container, baseStyles.sectionSpacing, baseStyles.header],
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: [styles.modernTitle, baseStyles.title, {
color: colors.text,
marginBottom: 0,
marginTop: 0
}],
children: t('signup.summary.title')
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: [styles.modernSubtitle, baseStyles.subtitle, {
color: colors.secondaryText,
marginBottom: 0,
marginTop: 0
}],
children: t('signup.summary.subtitle')
})]
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
style: [baseStyles.container, baseStyles.sectionSpacing],
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
title: t('signup.summary.sections.account') || t('signup.summary.sectionTitle') || 'Account Information',
theme: theme,
isFirst: true,
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
items: [{
id: 'username',
icon: 'person-outline',
iconColor: colors.primary,
title: t('signup.summary.fields.username'),
subtitle: `@${username || t('signup.summary.notSet')}`,
showChevron: false
}, {
id: 'email',
icon: 'mail-outline',
iconColor: colors.primary,
title: t('signup.summary.fields.email'),
subtitle: email || t('signup.summary.notSet'),
showChevron: false
}, {
id: 'password',
icon: 'lock-closed-outline',
iconColor: colors.primary,
title: t('signup.summary.fields.password') || 'Password',
subtitle: password ? '••••••••' : t('signup.summary.notSet'),
showChevron: false
}],
theme: theme
})
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
title: t('signup.summary.sections.next') || 'Next Steps',
theme: theme,
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
items: [{
id: 'security-tip',
icon: 'shield-checkmark',
iconColor: colors.warning,
title: t('signup.summary.next.securityTitle') || 'Keep your account secure',
subtitle: t('signup.summary.securityTip'),
showChevron: false,
multiRow: true,
dense: true
}, {
id: 'legal-reminder',
icon: 'checkmark-circle',
iconColor: colors.success,
title: t('signup.summary.next.legalTitle') || 'You’re all set',
subtitle: t('signup.summary.legalReminder'),
showChevron: false,
multiRow: true,
dense: true
}],
theme: theme
})
})]
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
style: [baseStyles.container, baseStyles.sectionSpacing, baseStyles.buttonContainer],
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GroupedPillButtons.default, {
buttons: [{
text: t('common.actions.back'),
onPress: prevStep,
icon: 'arrow-back',
variant: 'transparent'
}, {
text: t('common.actions.createAccount'),
onPress: nextStep,
icon: 'checkmark-circle',
variant: 'primary',
loading: isLoading,
disabled: !hasValidData
}],
colors: colors
})
})]
});
};
var _default = exports.default = SignUpSummaryStep;
//# sourceMappingURL=SignUpSummaryStep.js.map