import type { IPivotTableChangeSet, IPivotTableFilterInfo, IPivotTableOptions, IPivotTableQueryData, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFilter, IValueFilterInfoItem, PivotSubtotalTypeEnum } from '../types';
import { PivotLayoutTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '../types';
import { PivotTableLabelField, PivotTableValueField } from './table-field';
/**
 * @class PivotModel represents a config model for a pivot table.
 * @description The pivot model is a class that stores the pivot table's configuration information.
 * @typedef PivotModel
 * @property {string[]} rowFields - An array of row fields id.
 * @property {string[]} columnFields - An array of column fields id.
 * @property {string[]} valueFields - An array of value fields id.
 * @property {string[]} filterFields - An array of filter fields id.
 * @property {string[]} hiddenFields - An array of hidden fields id.
 * @property {Record<string, PivotTableLabelField>} dimension - A object of dimension fields, which key is the field id and value is the field.
 * @property {Record<string, PivotTableValueField>} measure - A object of measure fields, which key is the field id and value is the field.
 * @property {number} valueIndex - The special ΣValue fields order index in the dimension fields
 * @property {PivotTableValuePositionEnum} valuePosition - The special ΣValue fields position in row or column area.
 * @property {PivotLayoutTypeEnum} layout - The layout type of the pivot table.
 * @property {Record<string, any>} collapseInfo - The collapse information of the pivot table. Which data structure is {fieldId: boolean | {item: boolean}}
 */
export declare class PivotModel {
    /**
     *@property An array of row fields id.
     */
    rowFields: string[];
    /**
     *@property An array of column fields id.
     */
    columnFields: string[];
    /**
     *@property An array of value fields id.
     */
    valueFields: string[];
    /**
     *@property An array of filter fields id.
     */
    filterFields: string[];
    /**
     *@property An array of hidden fields id.
     */
    hiddenFields: string[];
    /**
     *@property An array of dimension fields.
     */
    dimension: Record<string, PivotTableLabelField>;
    /**
     *@property An array of measure fields.
     */
    measure: Record<string, PivotTableValueField>;
    /**
     *@property The special ΣValue fields order index in the dimension fields.
     *@description The special ΣValue fields order index in the dimension fields， the index value is equal to the index of the field in the row or column area which the ΣValue field followed.
     */
    valueIndex: number;
    /**
     *@property The special ΣValue fields position in row or column area.
     */
    valuePosition: PivotTableValuePositionEnum;
    /**
     *@property The layout type of the pivot table.
     */
    layout: PivotLayoutTypeEnum;
    /**
     * @property The collapse information of the pivot table.
     */
    collapseInfo: Record<string, boolean | Record<string, boolean>>;
    /**
     * Creates an instance of PivotModel.
     */
    options: IPivotTableOptions;
    _changeStack: IPivotTableChangeSet[];
    /**
     * the dirty status is used to flag the pivot table need to be queried data from the data source or just use cached tuple data.
     */
    private _isDirty;
    private _valueFilterInfo;
    constructor();
    startChangeStack(): void;
    endChangeStack(): IPivotTableChangeSet[];
    /**
     * - set a dirty status to flag the pivot table whether it is changed.
     * @param {boolean} dirty
     */
    setDirty(dirty: boolean): void;
    /**
     * - get the dirty status of the pivot table.
     * @returns {boolean} - The dirty status of the pivot table.
     */
    getDirty(): boolean;
    /**
     * - Set the options of the pivot table.
     * @param {IPivotTableOptions} options  - The options to be set.
     * @returns {void}
     */
    setOptions(options: IPivotTableOptions): void;
    /**
     *  - Get the options of the pivot table. It is a copy of the options.
     * @returns {IPivotTableOptions} - The options of the pivot table.
     */
    getOptions(): IPivotTableOptions;
    /**
     * @description Set the collapse status of the field. Those properties are used to save the collapse status of the field in the pivot table.
     * @param {string} fieldId - The id of the field.
     * @param {boolean} collapse - The collapse status of the field.
     * @param {string} [item] - The item of the field.
     */
    setCollapse(fieldId: string, collapse: boolean, item?: string): void;
    setLabelFilterInfo(fieldId: string, filterInfo: IPivotTableFilterInfo): void;
    setValueFilterInfo(fieldId: string, filterInfo: IPivotTableValueFilter | undefined): void;
    getValueFilterInfo(fieldId: string): IPivotTableValueFilter | undefined;
    getValueFilterInfos(): IValueFilterInfoItem[];
    removeValueFilterInfo(fieldId: string): void;
    removeValueFilterInfoByValueFieldId(valueFieldId: string): void;
    getFieldFormat(fieldId: string): string | undefined;
    setFieldFormat(fieldId: string, format: string | undefined): void;
    setSortInfo(fieldId: string, sortInfo: IPivotTableSortInfo | undefined): void;
    getSortInfo(fieldId: string): IPivotTableSortInfo | undefined;
    getFilterInfo(fieldId: string): IPivotTableFilterInfo | undefined;
    iterateField(callback: (field: PivotTableLabelField | PivotTableValueField) => void): void;
    iterateFieldDim(callback: (field: PivotTableLabelField) => void): void;
    iterateFieldMeasure(callback: (field: PivotTableValueField) => void): void;
    iterateFieldByArea(area: PivotTableFiledAreaEnum, callback: (field: PivotTableLabelField | PivotTableValueField) => void): void;
    /**
     * @description Add a field to the pivot table.
     * @param {PivotTableLabelField | PivotTableValueField} field -the field to be added.
     * @param {PivotTableFiledAreaEnum} area -The area to add the field.
     * @param {number} index  - The index of the field in the area.
     */
    addField(field: PivotTableLabelField | PivotTableValueField, area: PivotTableFiledAreaEnum, index?: number): void;
    /**
     * @description Get where the field bo be position info by field id.
     * @param {string} fieldId - The id of the field.
     * @typedef PositionInfo
     * @property {PivotTableFiledAreaEnum} area - The area of the field.
     * @property {number} index - The index of the field in the area.
     * @returns PositionInfo - The position info of the field. if the field is not in the pivot table, the area will be undefined and the index will be -1.
     */
    getFieldPositionInfoById(fieldId: string): {
        area: PivotTableFiledAreaEnum | undefined;
        index: number;
    };
    updateFieldSourceInfo(fieldId: string, sourceName: string, dataFieldId: string): void;
    getFieldsAreaByType(type: PivotTableFiledAreaEnum): string[];
    getFieldById(fieldId: string): PivotTableLabelField | PivotTableValueField | undefined;
    isExistFieldName(fieldName: string): boolean;
    /**
     * @description Rename a field in the pivot table.
     * @param {string} fieldId - The id of the field to be renamed.
     * @param displayName - The new display name of the field.
     * @returns {void}
     */
    renameField(fieldId: string, displayName: string): void;
    /**
     * @description Remove a field from the pivot table by the field id.
     * @param {string} fieldId - The id of the field to be removed.
     * @returns {void} -void
     */
    removeField(fieldId: string): void;
    updateFieldPosition(fieldId: string, area: PivotTableFiledAreaEnum, index: number): void;
    /**
     * - Update the value position of the pivot table.
     * @param valuePosition
     * @param valueIndex
     */
    updateValuePosition(valuePosition: PivotTableValuePositionEnum, valueIndex: number): void;
    /**
     * - The special ΣValue fields order index in the dimension fields
     * @returns {number} the index
     */
    getValueIndex(): number;
    getValuePosition(): PivotTableValuePositionEnum;
    /**
     *  - Whether the pivot table has the special ΣValue fields in column area.
     * @returns {boolean} - has or not.
     */
    isColMultiMeasure(): boolean;
    /**
     *  - Whether the pivot table has the special ΣValue fields in row area.
     * @returns {boolean} - has or not.
     */
    isRowMultiMeasure(): boolean;
    isEmpty(): boolean;
    /**
     * - set or update a field's subtotal type. , the table field must in the value area.
     * @param {string} tableFieldId - The id of the pivot table field.
     * @param {PivotSubtotalTypeEnum} subtotal - The subtotal type.
     */
    setSubtotalType(tableFieldId: string, subtotal: PivotSubtotalTypeEnum): void;
    /**
     * Represents the query data of the pivot table.Which is used to query the data from the data collection.
     * @returns {IPivotTableQueryData} - The query data of the pivot table.
     */
    getQueryData(): IPivotTableQueryData;
    /**
     * Resets the specified or all pivot table areas.
     * @param {PivotTableFiledAreaEnum} [area] - The area to be reset. If not passed, all areas will be reset.
     */
    reset(area?: PivotTableFiledAreaEnum): void;
    fromJSON(data: IPivotTableSnapshot): void;
    toJSON(): IPivotTableSnapshot;
    cloneBufferModel(): PivotModel;
}
