import { HandleCommand } from "@atomist/automation-client/lib/HandleCommand";
import { HandlerContext } from "@atomist/automation-client/lib/HandlerContext";
import { CommandDetails } from "@atomist/automation-client/lib/operations/CommandDetails";
import { ProjectAction } from "@atomist/automation-client/lib/operations/common/projectAction";
import { RepoRef } from "@atomist/automation-client/lib/operations/common/RepoId";
import { RepoLoader } from "@atomist/automation-client/lib/operations/common/repoLoader";
import { AnyProjectEditor } from "@atomist/automation-client/lib/operations/edit/projectEditor";
import { ProjectPersister } from "@atomist/automation-client/lib/operations/generate/generatorUtils";
import { RepoCreationParameters } from "@atomist/automation-client/lib/operations/generate/RepoCreationParameters";
import { SeedDrivenGeneratorParameters } from "@atomist/automation-client/lib/operations/generate/SeedDrivenGeneratorParameters";
import { Project } from "@atomist/automation-client/lib/project/Project";
import { Maker } from "@atomist/automation-client/lib/util/constructionUtils";
import { SoftwareDeliveryMachineOptions } from "../../../api/machine/SoftwareDeliveryMachineOptions";
import { CommandRegistration } from "../../../api/registration/CommandRegistration";
import { GeneratorRegistration, StartingPoint } from "../../../api/registration/GeneratorRegistration";
import { MachineOrMachineOptions } from "../../machine/toMachineOptions";
/**
 * Create a command handler for project generation
 * @param sdm this machine or its options
 * @param {EditorFactory<P extends SeedDrivenGeneratorParameters>} editorFactory to create editorCommand to perform transformation
 * @param {Maker<P extends SeedDrivenGeneratorParameters>} paramsMaker
 * @param {string} name
 * @param {Partial<GeneratorCommandDetails<P extends SeedDrivenGeneratorParameters>>} details
 * @return {HandleCommand}
 */
export declare function generatorCommand<P>(sdm: MachineOrMachineOptions, editorFactory: EditorFactory<P>, name: string, paramsMaker: Maker<P>, fallbackTarget: Maker<RepoCreationParameters>, startingPoint: StartingPoint<P>, details: Partial<GeneratorCommandDetails<any>>, cr: GeneratorRegistration<P>): HandleCommand;
export declare type EditorFactory<P> = (params: P, ctx: HandlerContext) => AnyProjectEditor<P>;
interface GeneratorCommandDetails<P extends SeedDrivenGeneratorParameters> extends CommandDetails {
    redirecter: (r: RepoRef) => string;
    projectPersister?: ProjectPersister;
    afterAction?: ProjectAction<P>;
}
/**
 * Return a parameters maker that is targeting aware
 * @param {Maker<PARAMS>} paramsMaker
 * @return {Maker<EditorOrReviewerParameters & PARAMS>}
 */
export declare function toGeneratorParametersMaker<PARAMS>(paramsMaker: Maker<PARAMS>, target: RepoCreationParameters): Maker<SeedDrivenGeneratorParameters & PARAMS>;
export declare function isSeedDrivenGeneratorParameters(p: any): p is SeedDrivenGeneratorParameters;
/**
 * Retrieve a seed. Set the seed location on the parameters if possible and necessary.
 */
export declare function computeStartingPoint<P extends SeedDrivenGeneratorParameters>(params: P, ctx: HandlerContext, repoLoader: RepoLoader, details: GeneratorCommandDetails<any>, startingPoint: StartingPoint<P>, cr: CommandRegistration<P>, sdmo: SoftwareDeliveryMachineOptions): Promise<Project>;
export {};
//# sourceMappingURL=generatorCommand.d.ts.map