import { USE_TICKETS_MOCK } from '../constants';
import type { TicketsApi } from '../types';
import { ticketsClientApi } from './clientApi';
import { ticketsMockApi } from './mockApi';

/**
 * The selected `TicketsApi` implementation — the single seam the hooks import. Selection is by config
 * (`USE_TICKETS_MOCK`), never scattered `if (mock)` checks. Mock-primary this phase (linked bookings are
 * mock-primary + REQ-028 summary gaps); the swap is this one line.
 */
export const ticketsApi: TicketsApi = USE_TICKETS_MOCK ? ticketsMockApi : ticketsClientApi;
