import { USE_BNPL_MOCK } from '../constants';
import type { BnplApi } from '../types';
import { bnplClientApi } from './clientApi';
import { bnplMockApi } from './mockApi';

/**
 * The selected `BnplApi` implementation — the single seam the hooks import. Selection is by config
 * (`USE_BNPL_MOCK`), never by scattered `if (mock)` checks.
 */
export const bnplApi: BnplApi = USE_BNPL_MOCK ? bnplMockApi : bnplClientApi;
