import 'package:flutter/material.dart';

import 'package:pshared/models/recipient/recipient.dart';

import 'package:pweb/pages/dashboard/payouts/single/address_book/avatar.dart';


class RecipientHeader extends StatelessWidget{
  final Recipient recipient;

  const RecipientHeader({super.key, required this.recipient});

  final double _avatarRadius = 20;

  @override
  Widget build(BuildContext context) {
    final theme = Theme.of(context);

    return ListTile(
      contentPadding: EdgeInsets.zero,
      leading: RecipientAvatar(
        isVisible: false,
        name: recipient.name,
        avatarUrl: recipient.avatarUrl,
        avatarRadius: _avatarRadius,
        nameStyle: Theme.of(context).textTheme.bodyMedium,
      ),
      title: Text(recipient.name, style: theme.textTheme.titleLarge),
      subtitle: Text(recipient.email, style: theme.textTheme.bodyLarge),
    );
  }
}