import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import 'package:pshared/controllers/payment/source.dart';

import 'package:pweb/pages/payout_page/wallet/edit/buttons/send.dart';
import 'package:pweb/pages/payout_page/wallet/edit/buttons/top_up.dart';


class ButtonsWalletWidget extends StatelessWidget {
  const ButtonsWalletWidget({super.key});

  @override
  Widget build(BuildContext context) {
    final source = context.watch<PaymentSourceController>();
    if (!source.hasSources) return const SizedBox.shrink();

    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      children: [
        Expanded(child: SendPayoutButton()),
        VerticalDivider(
          color: Theme.of(context).colorScheme.primary,
          thickness: 1,
          width: 10,
        ),
        Expanded(child: TopUpButton()),
      ],
    );
  }
}
