import { USE_BOOKING_REQUESTS_MOCK } from '../constants';
import type { BookingRequestsApi } from '../types';
import { bookingRequestsClientApi } from './clientApi';
import { bookingRequestsMockApi } from './mockApi';

/**
 * The selected `BookingRequestsApi` implementation — the single seam the hooks import. Selection is by
 * config (`USE_BOOKING_REQUESTS_MOCK`), never by scattered `if (mock)` checks.
 */
export const bookingRequestsApi: BookingRequestsApi = USE_BOOKING_REQUESTS_MOCK
  ? bookingRequestsMockApi
  : bookingRequestsClientApi;
