import type { ResponseDescription } from '../../http/output/response/ResponseDescription';
import type { InteractionHandler } from '../../identity/interaction/InteractionHandler';
import type { OperationHttpHandlerInput } from '../../server/OperationHttpHandler';
import { OperationHttpHandler } from '../../server/OperationHttpHandler';
import type { RepresentationConverter } from '../../storage/conversion/RepresentationConverter';
import type { KeyValueStorage } from '../../storage/keyvalue/KeyValueStorage';
import type { TemplateEngine } from '../../util/templates/TemplateEngine';
export interface SetupHttpHandlerArgs {
    /**
     * Used for converting the input data.
     */
    converter: RepresentationConverter;
    /**
     * Handles the requests.
     */
    handler: InteractionHandler;
    /**
     * Key that is used to store the boolean in the storage indicating setup is finished.
     */
    storageKey: string;
    /**
     * Used to store setup status.
     */
    storage: KeyValueStorage<string, boolean>;
    /**
     * Renders the main view.
     */
    templateEngine: TemplateEngine;
    /**
     * Determines if pods can be created in the root of the server.
     * Relevant to make sure there are no nested storages if registration is enabled for example.
     * Defaults to `true`.
     */
    allowRootPod?: boolean;
}
/**
 * Handles the initial setup of a server.
 * Will capture all requests until setup is finished,
 * this to prevent accidentally running unsafe servers.
 *
 * GET requests will return the view template which should contain the setup information for the user.
 * POST requests will be sent to the InteractionHandler.
 * After successfully completing a POST request this handler will disable itself and become unreachable.
 * All other methods will be rejected.
 */
export declare class SetupHttpHandler extends OperationHttpHandler {
    protected readonly logger: import("../..").Logger;
    private readonly handler;
    private readonly converter;
    private readonly storageKey;
    private readonly storage;
    private readonly templateEngine;
    private readonly allowRootPod;
    constructor(args: SetupHttpHandlerArgs);
    handle({ operation }: OperationHttpHandlerInput): Promise<ResponseDescription>;
    /**
     * Returns the HTML representation of the setup page.
     */
    private handleGet;
    /**
     * Converts the input data to JSON and calls the setup handler.
     * On success `true` will be written to the storage key.
     */
    private handlePost;
}
