import {
  authMachineSetup,
  authRootStateConfig,
} from "./machine/session-flow";
import { initialState } from "./auth-state";

export type { AuthState } from "./auth-state";
export { initialState } from "./auth-state";
export type { AuthEvent } from "./auth-events";

export const authMachine = authMachineSetup.createMachine({
  id: "auth",
  context: initialState,
  ...authRootStateConfig,
});

export type AuthMachine = typeof authMachine;
