// src/context/ApiContext.tsx
import { createContext } from 'react';
import * as apiClient from '../services/apiClient';

/**
 * Defines the shape of the context value, which includes all our API client functions.
 * This allows us to inject the entire API client as a dependency.
 */
type ApiContextType = typeof apiClient;

/**
 * Creates the React Context for the API client.
 * It's initialized with the actual apiClient module.
 */
export const ApiContext = createContext<ApiContextType>(apiClient);