import { USE_SEARCH_MOCK } from '../constants';
import type { SearchApi } from '../types';
import { searchClientApi } from './clientApi';
import { searchMockApi } from './mockApi';

/**
 * The selected SearchApi implementation — the single seam the hooks import. Selection is by config
 * (USE_SEARCH_MOCK), never by scattered `if (mock)` checks.
 */
export const searchApi: SearchApi = USE_SEARCH_MOCK ? searchMockApi : searchClientApi;
