import { useContext } from 'react';
import { ApiRequestBasketContext } from '../store/ApiRequestBasketContext';

export const useApiRequestBasket = () => {
  const ctx = useContext(ApiRequestBasketContext);
  if (!ctx) {
    throw new Error('useApiRequestBasket must be used within ApiRequestBasketProvider');
  }
  return ctx;
};
