import { InterpreterFrom } from "xstate";
import { SynthesizedStack } from "./synth-stack";
import { stackExecutionMachine } from "./stack-execution";
import { TerraformPlan } from "./models/terraform";
import { NestedTerraformOutputs } from "./output";
export declare type StackUpdate = {
    type: "planning";
    stackName: string;
} | {
    type: "planned";
    stackName: string;
    plan: TerraformPlan;
} | {
    type: "deploying";
    stackName: string;
} | {
    type: "deploy update";
    stackName: string;
    deployOutput: string;
} | {
    type: "deployed";
    stackName: string;
    outputsByConstructId: NestedTerraformOutputs;
    outputs: Record<string, any>;
} | {
    type: "destroying";
    stackName: string;
} | {
    type: "destroy update";
    stackName: string;
    destroyOutput: string;
} | {
    type: "destroyed";
    stackName: string;
} | {
    type: "outputs fetched";
    stackName: string;
    outputsByConstructId: NestedTerraformOutputs;
    outputs: Record<string, any>;
} | {
    type: "errored";
    stackName: string;
    error: string;
};
export declare type StackApprovalUpdate = {
    type: "waiting for stack approval";
    stackName: string;
    plan: TerraformPlan;
    approve: () => void;
    reject: () => void;
};
export declare class CdktfStack {
    stateMachine: InterpreterFrom<typeof stackExecutionMachine>;
    stackName: string;
    currentPlan?: TerraformPlan;
    stack: SynthesizedStack;
    outputs?: Record<string, any>;
    outputsByConstructId?: NestedTerraformOutputs;
    stopped: boolean;
    constructor({ stack, onUpdate, onLog, autoApprove, abortSignal, }: {
        stack: SynthesizedStack;
        onUpdate: (update: StackUpdate | StackApprovalUpdate) => void;
        onLog?: (log: {
            message: string;
        }) => void;
        autoApprove?: boolean;
        abortSignal: AbortSignal;
    });
    get currentState(): string;
    get isPending(): boolean;
    get isDone(): boolean;
    get isRunning(): boolean;
    get currentWorkPromise(): Promise<void> | undefined;
    private waitOnMachineDone;
    diff(stackName?: string): Promise<void>;
    deploy(stackName?: string): Promise<void>;
    destroy(stackName?: string): Promise<void>;
    fetchOutputs(): Promise<Record<string, any> | undefined>;
    stop(): Promise<void>;
}
