import { USE_CATALOG_MOCK } from '../constants';
import type { CatalogApi } from '../types';
import { catalogClientApi } from './clientApi';
import { catalogMockApi } from './mockApi';

/**
 * The selected CatalogApi implementation — the single seam the hooks import. Selection is by config
 * (USE_CATALOG_MOCK), never by scattered `if (mock)` checks.
 */
export const catalogApi: CatalogApi = USE_CATALOG_MOCK ? catalogMockApi : catalogClientApi;
