import {
  paymentMachineSetup,
  paymentRootStateConfig,
} from "./machine/order-flow";
import { initialState } from "./payment-state";

export type { PaymentEvent } from "./payment-events";
export type { PaymentState } from "./payment-state";
export { initialState } from "./payment-state";

export const paymentMachine = paymentMachineSetup.createMachine({
  id: "payment",
  context: initialState,
  ...paymentRootStateConfig,
});

export type PaymentMachine = typeof paymentMachine;
