/**
 * Supported debugger languages
 */
export var DebugLanguage;
(function (DebugLanguage) {
    DebugLanguage["PYTHON"] = "python";
    DebugLanguage["MOCK"] = "mock";
})(DebugLanguage || (DebugLanguage = {}));
/**
 * Session lifecycle state - represents the session's existence
 */
export var SessionLifecycleState;
(function (SessionLifecycleState) {
    /** Session is created but not initialized */
    SessionLifecycleState["CREATED"] = "created";
    /** Session is active and can accept debug operations */
    SessionLifecycleState["ACTIVE"] = "active";
    /** Session has been terminated and cannot accept operations */
    SessionLifecycleState["TERMINATED"] = "terminated";
})(SessionLifecycleState || (SessionLifecycleState = {}));
/**
 * Execution state - represents the debugger's execution state
 * Only meaningful when SessionLifecycleState is ACTIVE
 */
export var ExecutionState;
(function (ExecutionState) {
    /** Debug adapter is initializing */
    ExecutionState["INITIALIZING"] = "initializing";
    /** Program is running */
    ExecutionState["RUNNING"] = "running";
    /** Program is paused (at breakpoint, step, etc.) */
    ExecutionState["PAUSED"] = "paused";
    /** Program has terminated but session is still active */
    ExecutionState["TERMINATED"] = "terminated";
    /** Debug adapter encountered an error */
    ExecutionState["ERROR"] = "error";
})(ExecutionState || (ExecutionState = {}));
/**
 * Debug session state (legacy - for backward compatibility)
 * @deprecated Use SessionLifecycleState and ExecutionState instead
 */
export var SessionState;
(function (SessionState) {
    /** Session is created but not initialized */
    SessionState["CREATED"] = "created";
    /** Session is initializing */
    SessionState["INITIALIZING"] = "initializing";
    /** Session is ready to start debugging */
    SessionState["READY"] = "ready";
    /** Session is running */
    SessionState["RUNNING"] = "running";
    /** Session is paused at a breakpoint */
    SessionState["PAUSED"] = "paused";
    /** Session has stopped */
    SessionState["STOPPED"] = "stopped";
    /** Session encountered an error */
    SessionState["ERROR"] = "error";
})(SessionState || (SessionState = {}));
/**
 * Maps legacy SessionState to new state model
 */
export function mapLegacyState(legacyState) {
    switch (legacyState) {
        case SessionState.CREATED:
            return { lifecycle: SessionLifecycleState.CREATED };
        case SessionState.INITIALIZING:
        case SessionState.READY:
            return { lifecycle: SessionLifecycleState.ACTIVE, execution: ExecutionState.INITIALIZING };
        case SessionState.RUNNING:
            return { lifecycle: SessionLifecycleState.ACTIVE, execution: ExecutionState.RUNNING };
        case SessionState.PAUSED:
            return { lifecycle: SessionLifecycleState.ACTIVE, execution: ExecutionState.PAUSED };
        case SessionState.STOPPED:
            return { lifecycle: SessionLifecycleState.TERMINATED };
        case SessionState.ERROR:
            return { lifecycle: SessionLifecycleState.ACTIVE, execution: ExecutionState.ERROR };
    }
}
/**
 * Maps new state model to legacy SessionState
 */
export function mapToLegacyState(lifecycle, execution) {
    if (lifecycle === SessionLifecycleState.CREATED) {
        return SessionState.CREATED;
    }
    if (lifecycle === SessionLifecycleState.TERMINATED) {
        return SessionState.STOPPED;
    }
    // ACTIVE state - check execution state
    switch (execution) {
        case ExecutionState.INITIALIZING:
            return SessionState.INITIALIZING;
        case ExecutionState.RUNNING:
            return SessionState.RUNNING;
        case ExecutionState.PAUSED:
            return SessionState.PAUSED;
        case ExecutionState.TERMINATED:
            return SessionState.STOPPED;
        case ExecutionState.ERROR:
            return SessionState.ERROR;
        default:
            return SessionState.READY;
    }
}
//# sourceMappingURL=models.js.map