'use client' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import { ArrowLeft, Loader2, Play, FileText, Link2, Calendar, } from 'lucide-react' import { formatCurrency } from '@/lib/utils' import type { BankFileParseResult } from '@/lib/import/bank-file/types' interface BankFileConfirmStepProps { parseResult: BankFileParseResult onExecute: (options: { skip_duplicates: boolean; auto_categorize: boolean }) => void onBack: () => void isLoading: boolean } export default function BankFileConfirmStep({ parseResult, onExecute, onBack, isLoading, }: BankFileConfirmStepProps) { const { transactions, stats, date_from, date_to } = parseResult const refsCount = transactions.filter((t) => t.reference).length if (isLoading) { return (
Importerar transaktioner...
{stats.parsed_rows} transaktioner bearbetas
{stats.parsed_rows}
{date_from} – {date_to}
{formatCurrency(stats.total_income)}
{formatCurrency(stats.total_expenses)}