import 'package:cims_apps/application/component/card_transaction/card_transaction_view.dart';
import 'package:cims_apps/application/component/card_transaction/empty_card_transaction.dart';
import 'package:cims_apps/features/transaction/viewmodel/transaction_viewmodel.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class OnProcessView extends StatelessWidget {
  const OnProcessView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
      child:
          Consumer<TransactionViewModel>(builder: (context, provider, child) {
        return Column(children: [
          if (provider.listOnProcessTransaction.isEmpty)
            EmptyCardTransaction(
              onPressedButton: () {},
            ),
          ...provider.listOnProcessTransaction.map((e) {
            return CardTransactionView(
              step: 'on process',
              type: 'type',
              amount: 'amount',
              iconPath: 'iconPath',
              subs: 'subs',
              onTap: () {},
            );
          }),
        ]);
      }),
    );
  }
}
