import { Editor } from '../editor/editor.js';
import { CreatorUI } from './ui/creator-ui.js';
import { Highlighter } from './ui/highlighter.js';
import { IEditorWidget } from '../editor/widget/widget.js';
import { Stepper } from './stepper/stepper.js';
import { IChallengeData, Challenge } from '../challenge.js';
import { IDisposable } from 'monaco-editor';
import { CreatorDevTools } from './dev.js';
import { ContributionManager } from '../contribution.js';
export interface IStepData {
    [K: string]: any;
}
export interface IGeneratedStep {
    source: string;
    data: IStepData;
}
export interface IGeneratedChallenge {
    id: string;
    name: string;
    defaultApp: string;
    steps: IGeneratedStep[];
}
export interface ICopyGenerator {
    [K: string]: (...args: any[]) => string;
}
export declare const CopyGenerators: ContributionManager<ContributionManager<ICopyGenerator>>;
export declare class CreatorWidget implements IEditorWidget {
    domNode: CreatorUI;
    getDomNode(): CreatorUI;
    getPosition(): string | null;
    layout(): void;
}
export interface ICreatorOptions {
    copyGenerator?: string;
}
export declare abstract class Creator<T extends Stepper> {
    protected editor: Editor;
    protected subscriptions: IDisposable[];
    protected ui: CreatorWidget;
    protected highlighter: Highlighter;
    protected generatedSteps?: IGeneratedStep[];
    protected stepsMap: Map<string, IGeneratedStep>;
    protected whitelist: {
        [s: string]: string[];
    };
    protected partsWhitelist: {
        [s: string]: string[];
    };
    protected partsList: string[];
    protected stepper: T;
    private codeChangesSub?;
    protected app?: any;
    private loadedChallenge;
    protected challenge: Challenge | null;
    protected previewStepper: T | null;
    protected devTools: CreatorDevTools;
    protected aliasCounter: number;
    protected copyGenerator: ICopyGenerator;
    constructor(editor: Editor, opts?: ICreatorOptions);
    createChallenge(data: IChallengeData): Challenge;
    abstract createStepper(): T;
    createAlias(prefix?: string): string;
    watchCodeChanges(): void;
    unwatchCodeChanges(): void;
    onCodeChanged(): void;
    generate(): IGeneratedChallenge;
    generateChallenge(): {
        version: string;
        id: string;
        name: string;
        defaultApp: string;
        steps: IStepData[];
        whitelist: {
            [s: string]: string[];
        };
        partsWhitelist: {
            [s: string]: string[];
        };
        parts: string[];
    };
    addToWhitelist(category: string, id: string | null): void;
    addToPartsList(partType?: string, blockId?: string): void;
    loadChallenge(d: any): void;
    focusTarget(source: string): void;
    blurTarget(): void;
    selectFile(path: string): void;
    onInject(): void;
    /**
     * Add a download button to the editor's workpscae toolbar.
     * This button simply generate the challenge and triggers a download
     */
    setupDownloadButton(): void;
    setupDevTools(): void;
    playStep(step: IGeneratedStep): void;
    registerKeybindings(): void;
    nextStep(): void;
    previousStep(): void;
    selectStep(step: IGeneratedStep): void;
    toggleMode(step: IGeneratedStep): void;
    editStep(): void;
    getCopy(type: string, ...args: any[]): string;
    dispose(): void;
}
