11 lines
455 B
TypeScript
11 lines
455 B
TypeScript
import { USE_REFUNDS_MOCK } from '../constants';
|
|
import type { RefundsApi } from '../types';
|
|
import { refundsClientApi } from './clientApi';
|
|
import { refundsMockApi } from './mockApi';
|
|
|
|
/**
|
|
* The selected `RefundsApi` implementation — the single seam the hooks import. Selection is by config
|
|
* (`USE_REFUNDS_MOCK`), never by scattered `if (mock)` checks.
|
|
*/
|
|
export const refundsApi: RefundsApi = USE_REFUNDS_MOCK ? refundsMockApi : refundsClientApi;
|