libs/cart/src/injection-tokens/payment-method-map.ts
import { createSingleInjectionToken } from '@daffodil/core';
export const {
/**
* An injection token for a mapping from the platform-specific cart payment method
* to a user-defined platform-agnostic payment ID.
* It should be an object whose keys are the cart payment's method and whose values are strings.
* Defaults to an empty object.
*/
// TODO: refactor to upper snake case
token: DaffCartPaymentMethodIdMap,
/**
* Provider function for {@link DaffCartPaymentMethodIdMap}.
*/
provider: provideDaffCartPaymentMethodIdMap,
} = createSingleInjectionToken<{[key: string]: string}>(
'DaffCartPaymentMethodIdMap',
{ factory: () => ({}) },
);