import { useContext } from 'react';
import {
  OmnipayContext,
  type OmnipayContextType,
} from '../components/OmnipayProvider';

export function useOmnipay() {
  const { initiateBills, initiateWallet } = useContext(
    OmnipayContext
  ) as OmnipayContextType;
  return {
    initiateBills,
    initiateWallet,
  };
}
