import 'package:flutter/material.dart';


class LedgerBalanceRow extends StatelessWidget {
  final String balance;
  final bool isMasked;
  final VoidCallback onToggleMask;

  const LedgerBalanceRow({
    super.key,
    required this.balance,
    required this.isMasked,
    required this.onToggleMask,
  });

  @override
  Widget build(BuildContext context) {
    return Row(
      children: [
        Flexible(
          child: Text(
            balance,
            style: Theme.of(
              context,
            ).textTheme.headlineSmall?.copyWith(fontWeight: FontWeight.bold),
          ),
        ),
        const SizedBox(width: 8),
        GestureDetector(
          onTap: onToggleMask,
          child: Icon(
            isMasked ? Icons.visibility_off : Icons.visibility,
            size: 22,
          ),
        ),
      ],
    );
  }
}
