import 'package:flutter/material.dart';


class AmountHeadline extends StatelessWidget {
  final String amount;
  final String currency;

  const AmountHeadline({
    required this.amount,
    required this.currency,
  });

  @override
  Widget build(BuildContext context) {
    final theme = Theme.of(context);
    final amountStyle = theme.textTheme.headlineSmall?.copyWith(
      fontWeight: FontWeight.w600,
    );
    final currencyStyle = theme.textTheme.titleLarge?.copyWith(
      color: theme.colorScheme.onSurfaceVariant,
      fontWeight: FontWeight.w600,
    );

    if (currency.isEmpty) {
      return Text(amount, style: amountStyle);
    }

    return Row(
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        Text(amount, style: amountStyle),
        const SizedBox(width: 4),
        Text(currency, style: currencyStyle),
      ],
    );
  }
}