import { useContext } from 'react';
import { ManageProviderContext } from './ManageProviderContext';

const useManageProviderContext = () => {
  const context = useContext(ManageProviderContext);

  if (!context) throw new Error('useManageProviderContext must be used within AuthProvider');

  return context;
};

export { useManageProviderContext };
