import {
  privateZoneMachineSetup,
  privateZoneRootStateConfig,
} from "./machine/unlock-flow";
import { createInitialPrivateZoneState } from "./private-zone-state";

export type { PrivateZoneEvent } from "./private-zone-events";
export type { PrivateZoneState } from "./private-zone-state";
export { initialState } from "./private-zone-state";

export const privateZoneMachine = privateZoneMachineSetup.createMachine({
  id: "privateZone",
  context: ({ input }) =>
    createInitialPrivateZoneState(input.characterId),
  ...privateZoneRootStateConfig,
});

export type PrivateZoneMachine = typeof privateZoneMachine;
