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

const useManageMenusContext = () => {
  const context = useContext(ManageMenusContext);
  if (!context) {
    throw new Error('useManageMenusContext must be used within a ManageMenusContextProvider');
  }
  return context;
};

export { useManageMenusContext };
