import { USE_BOOKINGS_MOCK } from '../constants';
import type { BookingsApi } from '../types';
import { bookingsClientApi } from './clientApi';
import { bookingsMockApi } from './mockApi';

/**
 * The selected `BookingsApi` implementation — the single seam the hooks import. Selection is by config
 * (`USE_BOOKINGS_MOCK`), never by scattered `if (mock)` checks.
 */
export const bookingsApi: BookingsApi = USE_BOOKINGS_MOCK ? bookingsMockApi : bookingsClientApi;
