import 'package:flutter/material.dart';

import 'package:pshared/models/asset.dart';
import 'package:pshared/utils/currency.dart';


class PaymentSummaryRow extends StatelessWidget {
  final String Function(String) labelFactory;
  final Asset? asset;
  final TextStyle? style;

  const PaymentSummaryRow({
    super.key, 
    required this.labelFactory, 
    required this.asset,
    this.style,
  });

  @override
  Widget build(BuildContext context) => Text(
    labelFactory(asset == null ? 'N/A' : assetToString(asset!)), 
    style: style,
  );
}
