/**
 * React Query key factory for the BNPL domain (hierarchical, per the `services/{domain}` pattern).
 * Options / eligibility / schedule / order all run against the accepted booking-request id; the Wallet
 * installment status (D5) is a customer-wide read (no id).
 */
export const bnplKeys = {
  all: ['bnpl'] as const,
  options: (bookingRequestId: number) => [...bnplKeys.all, 'options', bookingRequestId] as const,
  eligibility: (bookingRequestId: number) => [...bnplKeys.all, 'eligibility', bookingRequestId] as const,
  schedule: (bookingRequestId: number, providerCode: string, planId: string) =>
    [...bnplKeys.all, 'schedule', bookingRequestId, providerCode, planId] as const,
  orders: () => [...bnplKeys.all, 'order'] as const,
  order: (bookingRequestId: number) => [...bnplKeys.orders(), bookingRequestId] as const,
  walletInstallments: () => [...bnplKeys.all, 'wallet-installments'] as const,
};
