// src/providers/ApiProvider.tsx
import React, { ReactNode } from 'react';
import { ApiContext } from '../contexts/ApiContext';
import * as apiClient from '../services/apiClient';

/**
 * A provider component that makes the API client functions available to all child components
 * via the `useContext` hook.
 * @param {object} props - The component props.
 * @param {ReactNode} props.children - The child components to render.
 */
export const ApiProvider = ({ children }: { children: ReactNode }) => {
  return <ApiContext.Provider value={apiClient}>{children}</ApiContext.Provider>;
};