import type { IFieldsCollectionJSON, IPivotTableSnapshot } from '@univerjs-pro/engine-pivot'; import type { IPivotTableConfig } from '../const/type'; export interface IPivotSheetCopyScope { unitId: string; sourceSubUnitId: string; targetSubUnitId: string; targetSubUnitName: string; } export interface IPivotSheetCopySource { pivotTableId: string; pivotTableConfig: IPivotTableConfig; collectionConfig: IFieldsCollectionJSON; } export type IPivotSheetCopyPlanEntry = IPivotSheetCopySource; export interface IPivotSheetDataFieldCopyContext { dataFieldIdMap: Map; reservedDataFieldIds: Set; } export interface IPivotSheetCopyPlan { entries: IPivotSheetCopyPlanEntry[]; pivotTableIdMap: Map; dataFieldContext: IPivotSheetDataFieldCopyContext; } export interface IPivotSheetCopyIdFactory { dataField: () => string; pivotTable: () => string; } export declare const PIVOT_SHEET_COPY_CONTEXT_KEY = "univer.sheets-pivot.copy-plan"; export declare function createPivotSheetCopyPlan(sources: readonly IPivotSheetCopySource[], scope: IPivotSheetCopyScope, idFactory?: IPivotSheetCopyIdFactory): IPivotSheetCopyPlanEntry[]; export declare function getOrCreatePivotSheetCopyPlan(copyContext: Map | undefined, sources: readonly IPivotSheetCopySource[], scope: IPivotSheetCopyScope, idFactory?: IPivotSheetCopyIdFactory): IPivotSheetCopyPlan; export declare function remapPivotReportDataFields(collectionConfig: IFieldsCollectionJSON, fieldsConfig: IPivotTableSnapshot, context: IPivotSheetDataFieldCopyContext, idFactory?: IPivotSheetCopyIdFactory): void;