import { USE_PAYMENT_MOCK } from '../constants';
import type { PaymentApi } from '../types';
import { paymentClientApi } from './clientApi';
import { paymentMockApi } from './mockApi';

/**
 * The selected `PaymentApi` implementation — the single seam the hooks import. Selection is by config
 * (`USE_PAYMENT_MOCK`), never by scattered `if (mock)` checks.
 */
export const paymentApi: PaymentApi = USE_PAYMENT_MOCK ? paymentMockApi : paymentClientApi;
