import { USE_AUTH_MOCK } from '../constants';
import type { AuthApi } from '../types';
import { authClientApi } from './clientApi';
import { authMockApi } from './mockApi';

/**
 * The selected AuthApi implementation — the single seam every auth hook imports. Selection is
 * by config (USE_AUTH_MOCK), never by scattered `if (mock)` checks.
 */
export const authApi: AuthApi = USE_AUTH_MOCK ? authMockApi : authClientApi;
