/**
 * 记一笔：NumpadSheet 整页宿主（P3）。
 * 编辑（editId）/ 草稿（draftJson）/ OCR（mode=ocr）预填复用同一面板。
 */
import React from 'react';
import { StyleSheet } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { useLocalSearchParams } from 'expo-router';
import { useTheme } from '../../theme';
import { NumpadSheet } from '../../components/NumpadSheet';

export default function NewTransactionScreen() {
  const { theme } = useTheme();
  const { mode, editId, draftJson } = useLocalSearchParams<{ mode?: string; editId?: string; draftJson?: string }>();
  return (
    <SafeAreaView style={[styles.page, { backgroundColor: theme.colors.bgPrimary }]} edges={['bottom', 'left', 'right']}>
      <NumpadSheet
        presentation="page"
        editId={editId}
        draftJson={draftJson}
        autoOcr={mode === 'ocr'}
      />
    </SafeAreaView>
  );
}

const styles = StyleSheet.create({
  page: { flex: 1 },
});
