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

const useManageAccessTypeContext = () => {
  const context = useContext(ManageAccessTypeContext);

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

  return context;
};

export { useManageAccessTypeContext };
