import { useApi } from './api.mjs';
import { useSubscription } from './subscription.mjs';

/**
 * Returns all available payment options.
 */
function useAvailablePaymentOptions() {
  const api = useApi();
  return useSubscription(api.availablePaymentOptions);
}

/**
 * Returns payment options selected by the buyer.
 */
function useSelectedPaymentOptions() {
  const api = useApi();
  return useSubscription(api.selectedPaymentOptions);
}

export { useAvailablePaymentOptions, useSelectedPaymentOptions };
