import { useTheme } from '@/components/ThemeContext'; import React, { Dispatch, forwardRef, SetStateAction } from 'react'; import { useTranslation } from 'react-i18next'; import { ScrollView, StyleSheet, Text, View } from 'react-native'; import { CreateAdsResponse } from '../lib/types'; type StepFourProps = { setPayment: Dispatch>; data: CreateAdsResponse | null; }; const StepFour = forwardRef(({ data }: StepFourProps) => { const { isDark } = useTheme(); const { t } = useTranslation(); const theme = { background: isDark ? '#0f172a' : '#ffffff', cardBg: isDark ? '#1e293b' : '#f8fafc', cardBorder: isDark ? '#334155' : '#e2e8f0', text: isDark ? '#f8fafc' : '#0f172a', textSecondary: isDark ? '#cbd5e1' : '#64748b', totalPrice: isDark ? '#f87171' : '#ef4444', }; const totalPrice = data?.data.total_price || 0; return ( <> {t("To'lov uchun ma'lumotlar")} {t("E'lon nomi")}: {data?.data.title} {t("E'lon tavsifi")}: {data?.data.description} {t('Umumiy narx')}:{' '} {totalPrice} {t("so'm")} ); }); export default StepFour; const styles = StyleSheet.create({ container: { flexGrow: 1 }, sectionTitle: { fontSize: 18, fontWeight: '700', marginVertical: 12 }, card: { borderRadius: 16, padding: 20, marginBottom: 20, borderWidth: 1, gap: 8, }, label: { fontSize: 15, fontWeight: '600' }, value: { fontWeight: '800' }, total: { marginTop: 8, fontSize: 16 }, });