import { type IAutomationMetadataObject, type IDashboardExportParameter, type IdentifierRef } from "@gooddata/sdk-model";
import type { ExtendedDashboardWidget } from "../../../../model/types/layoutTypes.js";
import { type IAutomationParameter } from "./automationParameters.js";
/**
 * Per-tab parameter working set, keyed by tab `localIdentifier`.
 * @internal
 */
export type EditedParametersByTab = Record<string, IAutomationParameter[]>;
/**
 * @internal
 */
export interface IUseAutomationExportParametersProps {
    automationToEdit?: IAutomationMetadataObject;
    widget?: ExtendedDashboardWidget;
    /**
     * Persist parameter values onto the export, versus omitting them so the server resolves the
     * latest dashboard defaults. Widget schedules force-store (no store-filters checkbox).
     */
    storeParameters?: boolean;
    /**
     * Writes the per-tab parameter wire back onto the edited automation; `undefined` clears it.
     * The user-edit path into `content.parametersByTab` (export-definition rebuilds re-carry it separately).
     */
    setParametersWire: (wire: Record<string, IDashboardExportParameter[]> | undefined) => void;
}
/**
 * Scheduled-export parameter editing behind one seam: chips and addable sets to render, the
 * add/change/delete handlers (flat + per-tab), and the wire write-back onto the edited automation.
 * The working set (full execution set incl. `hidden` entries) is implementation — it is held outside
 * the automation so turning persistence off can drop the stored wire without losing the chips. Mirrors
 * {@link useAutomationAlertParameters} in role.
 *
 * The automation is written only at user interactions, never on mount — new automations are seeded
 * at document creation by the owning dialog, and an edited automation's stored wire must survive an
 * open-and-close untouched, or the dialog would open dirty (reconstruct → re-encode is lossy).
 *
 * @internal
 */
export interface IUseAutomationExportParameters {
    parametersEnabled: boolean;
    /**
     * Per-tab visible parameters to render as chips (the execution set minus `hidden` entries).
     */
    visibleParametersByTab: EditedParametersByTab;
    /**
     * Per-tab workspace parameters addable via the "+" menu (catalog minus selected/hidden/readonly).
     */
    availableParametersByTab: EditedParametersByTab;
    /**
     * The tab the flat (non-tabbed) UI edits — the widget's owning tab or the single dashboard tab.
     * Undefined for multi-tab dashboards (per-tab rendering) or when no parameter context applies.
     */
    flatTabId: string | undefined;
    onParameterAdd: (ref: IdentifierRef) => void;
    onParameterChange: (ref: IdentifierRef, value: number) => void;
    onParameterDelete: (ref: IdentifierRef) => void;
    onParameterAddByTab: (tabId: string, ref: IdentifierRef) => void;
    onParameterChangeByTab: (tabId: string, ref: IdentifierRef, value: number) => void;
    onParameterDeleteByTab: (tabId: string, ref: IdentifierRef) => void;
    /**
     * Resets the working set to the current dashboard's effective values and writes it back — the
     * "apply latest" flow, dropping any stale stored entries the staleness gate flagged.
     */
    applyLatest: () => void;
    /**
     * `storeParameters` still holds the old value at call time, so the new value is passed in;
     * re-encodes the working set onto the automation with it.
     */
    onStoreParametersChange: (storeParameters: boolean) => void;
}
/**
 * @internal
 */
export declare function useAutomationExportParameters({ automationToEdit, widget, storeParameters, setParametersWire }: IUseAutomationExportParametersProps): IUseAutomationExportParameters;
//# sourceMappingURL=useAutomationExportParameters.d.ts.map