import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import 'package:pshared/provider/payment/quotation/quotation.dart';

import 'package:pweb/pages/dashboard/payouts/summary/row.dart';

import 'package:pweb/generated/i18n/app_localizations.dart';

class PaymentFeeRow extends StatelessWidget {
  const PaymentFeeRow({super.key});

  @override
  Widget build(BuildContext context) => Consumer<QuotationProvider>(
    builder: (context, provider, _) {
      final fee = provider.fee;
      final l10 = AppLocalizations.of(context)!;
      return PaymentSummaryRow(
        labelFactory: l10.fee,
        money: fee,
        value: fee == null ? l10.noFee : null,
        style: Theme.of(context).textTheme.titleMedium,
      );
    },
  );
}
