import 'server-only'

import { SynchronApiNotConfiguredError, type SynchronPaymentsAdapter } from './types'

/**
 * The production adapter. Every operation is intentionally unconnected until
 * Synchron answers the integration questionnaire — the endpoint URLs, the
 * checkout-session response, the webhook payload and the authentication
 * between HHA and Synchron are all unknown (task §30). Nothing here invents
 * them. When the contract arrives, only this file and the callback schema in
 * src/lib/integrations/synchron-contract.ts change.
 */
export const liveSynchronPayments: SynchronPaymentsAdapter = {
  mode: 'live',
  async createRoutePurchase() { throw new SynchronApiNotConfiguredError('createRoutePurchase') },
  async requestRouteCheckout() { throw new SynchronApiNotConfiguredError('requestRouteCheckout') },
  async getRoutePurchaseStatus() { throw new SynchronApiNotConfiguredError('getRoutePurchaseStatus') },
  async getRoutePurchaseItems() { throw new SynchronApiNotConfiguredError('getRoutePurchaseItems') },
  async getCustomerPaymentStatus() { throw new SynchronApiNotConfiguredError('getCustomerPaymentStatus') },
  async requestCardSetup() { throw new SynchronApiNotConfiguredError('requestCardSetup') },
  async confirmCardUse() { throw new SynchronApiNotConfiguredError('confirmCardUse') },
  async getCardSetupStatus() { throw new SynchronApiNotConfiguredError('getCardSetupStatus') },
  async submitPermitOrder() { throw new SynchronApiNotConfiguredError('submitPermitOrder') },
  async reconcilePurchaseStatus() { throw new SynchronApiNotConfiguredError('reconcilePurchaseStatus') },
}
