/** * Account Screen * Pure UI component for account management * Business logic provided via props from app layer * PERFORMANCE: Memoized to prevent unnecessary re-renders */ import React, { memo } from "react"; import { View, TouchableOpacity, StyleSheet } from "react-native"; import { useAppDesignTokens } from "@umituz/react-native-design-system/theme"; import { AtomicIcon, AtomicText } from "@umituz/react-native-design-system/atoms"; import { ScreenLayout } from "@umituz/react-native-design-system/layouts"; import { actionButtonStyle } from "../utils/commonStyles"; import { ProfileSection, type ProfileSectionConfig } from "../components/ProfileSection"; import { AccountActions, type AccountActionsConfig } from "../components/AccountActions"; export interface AccountScreenConfig { profile: ProfileSectionConfig; accountActions?: AccountActionsConfig; isAnonymous: boolean; editProfileText?: string; onEditProfile?: () => void; onSignIn?: () => void; title?: string; PasswordPromptComponent?: React.ReactNode; } export interface AccountScreenProps { config: AccountScreenConfig; } export const AccountScreen = memo(({ config }) => { const tokens = useAppDesignTokens(); return ( <> {/* Edit Profile Option */} {!config.isAnonymous && config.onEditProfile && config.editProfileText && ( <> {config.editProfileText} )} {!config.isAnonymous && config.accountActions && ( <> )} {config.PasswordPromptComponent} ); }); AccountScreen.displayName = 'AccountScreen'; const styles = StyleSheet.create({ content: { padding: 16, }, divider: { height: 24, }, });