import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import 'package:pshared/models/asset.dart';
import 'package:pshared/models/currency.dart';
import 'package:pshared/provider/payment/amount.dart';

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

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


class PaymentSentAmountRow extends StatelessWidget {
  final Currency currency;
  const PaymentSentAmountRow({super.key, required this.currency});

  @override
  Widget build(BuildContext context) => Consumer<PaymentAmountProvider>(
    builder: (context, provider, _) => PaymentSummaryRow(
      labelFactory: AppLocalizations.of(context)!.sentAmount,
      asset: Asset(currency: currency, amount: provider.amount),
      style: Theme.of(context).textTheme.titleMedium,
    ),
  );
}
