/**
 * Shared helper for dynamic container mutations.
 * Encapsulates the common lifecycle for adding/removing child views.
 */
export default class ContainerMutationHelper {
    /**
     * @typedef {import("./view.js").default} View
     * @typedef {import("../spec/view.js").ViewSpec} ViewSpec
     * @typedef {import("../spec/view.js").ImportSpec} ImportSpec
     *
     * @typedef {{
     *   specs: (ViewSpec | ImportSpec)[],
     *   insertAt: (index: number, spec: ViewSpec | ImportSpec) => void,
     *   removeAt: (index: number) => void
     * }} ChildSpecs
     */
    /**
     * @typedef {{
     *   getChildSpecs: () => ChildSpecs,
     *   insertView: (view: View, index: number) => any,
     *   removeView: (index: number) => void,
     *   prepareView?: (view: View, index: number, insertionResult: any) => Promise<void>,
     *   afterRemove?: (index: number) => Promise<void>,
     *   defaultName?: (index: number, spec: ViewSpec | ImportSpec) => string,
     *   createViewOptions?: import("../types/viewContext.js").CreateViewOptions,
     *   requestLayout?: boolean
     * }} MutationOptions
     */
    /**
     * @param {import("./containerView.js").default} container
     * @param {MutationOptions} options
     */
    constructor(container: import("./containerView.js").default, options: {
        getChildSpecs: () => {
            specs: (import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec)[];
            insertAt: (index: number, spec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec) => void;
            removeAt: (index: number) => void;
        };
        insertView: (view: import("./view.js").default<import("../spec/view.js").ViewSpec>, index: number) => any;
        removeView: (index: number) => void;
        prepareView?: (view: import("./view.js").default<import("../spec/view.js").ViewSpec>, index: number, insertionResult: any) => Promise<void>;
        afterRemove?: (index: number) => Promise<void>;
        defaultName?: (index: number, spec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec) => string;
        createViewOptions?: import("../types/viewContext.js").CreateViewOptions;
        requestLayout?: boolean;
    });
    container: import("./containerView.js").default<import("../spec/view.js").ContainerSpec>;
    options: {
        getChildSpecs: () => {
            specs: (import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec)[];
            insertAt: (index: number, spec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec) => void;
            removeAt: (index: number) => void;
        };
        insertView: (view: import("./view.js").default<import("../spec/view.js").ViewSpec>, index: number) => any;
        removeView: (index: number) => void;
        prepareView?: (view: import("./view.js").default<import("../spec/view.js").ViewSpec>, index: number, insertionResult: any) => Promise<void>;
        afterRemove?: (index: number) => Promise<void>;
        defaultName?: (index: number, spec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec) => string;
        createViewOptions?: import("../types/viewContext.js").CreateViewOptions;
        requestLayout?: boolean;
    };
    /**
     * Adds a child spec dynamically and initializes its subtree dataflow.
     *
     * @param {import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec} childSpec
     * @param {number} [index]
     * @returns {Promise<View>}
     */
    addChildSpec(childSpec: import("../spec/view.js").ViewSpec | import("../spec/view.js").ImportSpec, index?: number): Promise<import("./view.js").default<import("../spec/view.js").ViewSpec>>;
    /**
     * Removes a child by index and updates the backing spec list.
     *
     * @param {number} index
     */
    removeChildAt(index: number): Promise<void>;
}
//# sourceMappingURL=containerMutationHelper.d.ts.map