import { ActionResult } from "matrix-protection-suite";
import { IConfig } from "../config";
import { DraupnirFactory } from "./DraupnirFactory";
import { Draupnir } from "../Draupnir";
import { StringUserID, MatrixRoomID } from "@the-draupnir-project/matrix-basic-types";
import { SafeModeDraupnir } from "../safemode/DraupnirSafeMode";
import { SafeModeCause } from "../safemode/SafeModeCause";
import { DraupnirRestartError, SafeModeToggle } from "../safemode/SafeModeToggle";
import { ResultError } from "@gnuxie/typescript-result";
export declare class StandardDraupnirManager {
    protected readonly draupnirFactory: DraupnirFactory;
    private readonly draupnir;
    private readonly failedDraupnir;
    private readonly safeModeDraupnir;
    constructor(draupnirFactory: DraupnirFactory);
    unregisterListeners(): void;
    makeSafeModeToggle(clientUserID: StringUserID, managementRoom: MatrixRoomID, config: IConfig): SafeModeToggle;
    makeDraupnir(clientUserID: StringUserID, managementRoom: MatrixRoomID, config: IConfig): Promise<ActionResult<Draupnir, DraupnirRestartError | ResultError>>;
    makeSafeModeDraupnir(clientUserID: StringUserID, managementRoom: MatrixRoomID, config: IConfig, cause: SafeModeCause): Promise<ActionResult<SafeModeDraupnir>>;
    private isNormalDraupnir;
    private isSafeModeDraupnir;
    /**
     * Whether the draupnir is available to the user, either normally or via safe mode.
     */
    isDraupnirAvailable(draupnirClientID: StringUserID): boolean;
    isDraupnirFailed(draupnirClientID: StringUserID): boolean;
    reportUnstartedDraupnir(failType: DraupnirFailType, cause: unknown, draupnirClientID: StringUserID): void;
    getUnstartedDraupnirs(): UnstartedDraupnir[];
    findUnstartedDraupnir(draupnirClientID: StringUserID): UnstartedDraupnir | undefined;
    findRunningDraupnir(draupnirClientID: StringUserID): Draupnir | undefined;
    stopDraupnir(clientUserID: StringUserID): void;
}
export declare class UnstartedDraupnir {
    readonly clientUserID: StringUserID;
    readonly failType: DraupnirFailType;
    readonly cause: unknown;
    constructor(clientUserID: StringUserID, failType: DraupnirFailType, cause: unknown);
}
export declare enum DraupnirFailType {
    Unauthorized = "Unauthorized",
    StartError = "StartError",
    InitializationError = "InitializationError"
}
//# sourceMappingURL=StandardDraupnirManager.d.ts.map