import type { IChartSnapshot } from '@univerjs-pro/engine-chart';
import type { IPivotTableSnapshot } from '@univerjs-pro/engine-pivot';
import type { IPivotCacheReference, PivotCacheReference } from '@univerjs-pro/pivot-cache';
export declare enum PivotChartSourceKind {
    Range = "range",
    PivotTable = "pivotTable"
}
export interface IPivotChartControls {
    showFieldButtons: boolean;
    showExpandCollapseButtons: boolean;
}
export declare const DEFAULT_PIVOT_CHART_CONTROLS: IPivotChartControls;
interface IPivotChartDefinitionBase {
    id: string;
    chart: IChartSnapshot;
    name?: string;
    /** Persisted PivotChart-only controls. Missing values keep legacy snapshots visible. */
    controls?: Partial<IPivotChartControls>;
}
/** Reference to a PivotTable that owns the PivotModel used by a PivotChart. `subUnitId` is its last known location. */
export interface IPivotChartPivotTableReference {
    unitId: string;
    subUnitId: string;
    pivotTableId: string;
}
/** A PivotChart whose PivotModel is owned by the chart itself. */
export interface IOwnedPivotChartDefinition<TReference extends IPivotCacheReference = PivotCacheReference> extends IPivotChartDefinitionBase {
    cacheRef: TReference;
    pivotModel: IPivotTableSnapshot;
    pivotTableRef?: never;
}
/** A PivotChart that shares the PivotModel owned by an existing PivotTable. */
export interface ILinkedPivotChartDefinition extends IPivotChartDefinitionBase {
    pivotTableRef: IPivotChartPivotTableReference;
    cacheRef?: never;
    pivotModel?: never;
}
/** Host-neutral persisted definition of a pivot chart. */
export type IPivotChartDefinition<TReference extends IPivotCacheReference = PivotCacheReference> = IOwnedPivotChartDefinition<TReference> | ILinkedPivotChartDefinition;
export declare function isLinkedPivotChartDefinition(definition: IPivotChartDefinition): definition is ILinkedPivotChartDefinition;
export declare function isOwnedPivotChartDefinition(definition: IPivotChartDefinition): definition is IOwnedPivotChartDefinition;
export declare function resolvePivotChartControls(controls: Partial<IPivotChartControls> | undefined): IPivotChartControls;
export {};
