import { USE_SERVICE_AREAS_MOCK } from '../constants';
import type { ServiceAreasApi } from '../types';
import { serviceAreasClientApi } from './clientApi';
import { serviceAreasMockApi } from './mockApi';

/**
 * The selected ServiceAreasApi implementation — the single seam hooks import. Selection is by
 * config (USE_SERVICE_AREAS_MOCK), never by scattered `if (mock)` checks.
 */
export const serviceAreasApi: ServiceAreasApi = USE_SERVICE_AREAS_MOCK
  ? serviceAreasMockApi
  : serviceAreasClientApi;
