import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import 'package:pshared/controllers/balance_mask/wallets.dart';
import 'package:pshared/models/payment/wallet.dart';

import 'package:pweb/utils/payment/dropdown.dart';


class PaymentMethodSelector extends StatelessWidget {
  final ValueChanged<Wallet> onMethodChanged;

  const PaymentMethodSelector({
    super.key,
    required this.onMethodChanged,
  });

  @override
  Widget build(BuildContext context) => Consumer<WalletsController>(
        builder: (context, provider, _) => PaymentMethodDropdown(
          methods: provider.wallets,
          selectedMethod: provider.selectedWallet,
          onChanged: onMethodChanged,
        ),
      );
}
