import 'package:flutter/material.dart';

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


class CurrencySymbolAvatar extends StatelessWidget {
  final Wallet wallet;

  const CurrencySymbolAvatar({super.key, required this.wallet});

  @override
  Widget build(BuildContext context) {
    final code = currencyCodeToString(wallet.currency);
    final symbol = currencySymbolFromCode(code) ?? code;
    final textTheme = Theme.of(context).textTheme;

    return CircleAvatar(
      radius: 24,
      child: Text(
        symbol,
        style: textTheme.titleLarge?.copyWith(fontWeight: FontWeight.w700),
      ),
    );
  }
}
