import { type ActorRefFrom, type SnapshotFrom } from 'xstate'; import type { MailboxInfo } from '../../types/mailbox'; export type ConnectionContext = { readonly greeting: string; readonly user: string; readonly mailbox: MailboxInfo | null; readonly error: Error | null; readonly startedAt: number; }; export type ConnectionEvents = { readonly type: 'CONNECT_START'; } | { readonly type: 'GREETING_RECEIVED'; readonly greeting: string; } | { readonly type: 'PREAUTH_RECEIVED'; readonly user: string; } | { readonly type: 'AUTHENTICATED'; readonly user: string; } | { readonly type: 'MAILBOX_SELECTED'; readonly mailbox: MailboxInfo; } | { readonly type: 'MAILBOX_CLOSED'; } | { readonly type: 'LOGOUT_INITIATED'; } | { readonly type: 'CONNECTION_CLOSED'; } | { readonly type: 'ERROR'; readonly error: Error; }; export type ConnectionStateValue = 'DISCONNECTED' | 'CONNECTING' | 'NOT_AUTHENTICATED' | 'AUTHENTICATED' | 'SELECTED' | 'LOGOUT'; export declare const connectionMachine: import("xstate").StateMachine; export type ConnectionMachine = typeof connectionMachine; export type ConnectionActor = ActorRefFrom; export type ConnectionSnapshot = SnapshotFrom; export declare const createConnectionActor: (id?: string) => ConnectionActor; export declare const getStateValue: (snapshot: ConnectionSnapshot) => ConnectionStateValue; export declare const isDisconnected: (snapshot: ConnectionSnapshot) => boolean; export declare const isConnecting: (snapshot: ConnectionSnapshot) => boolean; export declare const isNotAuthenticated: (snapshot: ConnectionSnapshot) => boolean; export declare const isAuthenticated: (snapshot: ConnectionSnapshot) => boolean; export declare const isSelected: (snapshot: ConnectionSnapshot) => boolean; export declare const isLogout: (snapshot: ConnectionSnapshot) => boolean; export declare const isConnected: (snapshot: ConnectionSnapshot) => boolean; //# sourceMappingURL=state-machine.d.ts.map