import 'package:flutter/material.dart';

import 'package:pshared/models/payment/methods/type.dart';

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


class PaymentMethodSelector extends StatelessWidget {
  final PaymentMethodsProvider methodsProvider;
  final ValueChanged<PaymentMethod> onMethodChanged;

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

  @override
  Widget build(BuildContext context) {
    return PaymentMethodDropdown(
      methods: methodsProvider.methods,
      initialValue: methodsProvider.selectedMethod,
      onChanged: onMethodChanged,
    );
  }
}
