import { BaseXform } from "@excel/xlsx/xform/base-xform";
/**
 * Model for generating pivot table (with live source)
 */
interface PivotTableModel {
    rows: number[];
    columns: number[];
    values: number[];
    metric: "sum" | "count";
    cacheFields: any[];
    cacheId: number;
    applyWidthHeightFormats: "0" | "1";
}
/**
 * Parsed pivot field
 */
interface ParsedPivotField {
    axis?: "axisRow" | "axisCol" | "axisPage" | "axisValues";
    dataField?: boolean;
    items?: number[];
    compact?: boolean;
    outline?: boolean;
    showAll?: boolean;
    defaultSubtotal?: boolean;
}
/**
 * Parsed data field
 */
interface ParsedDataField {
    name: string;
    fld: number;
    baseField?: number;
    baseItem?: number;
    subtotal?: "sum" | "count" | "average" | "max" | "min" | "product" | "countNums" | "stdDev" | "stdDevP" | "var" | "varP";
}
/**
 * Parsed pivot table model (loaded from file)
 */
interface ParsedPivotTableModel {
    name?: string;
    cacheId: number;
    uid?: string;
    location?: {
        ref: string;
        firstHeaderRow?: number;
        firstDataRow?: number;
        firstDataCol?: number;
    };
    pivotFields: ParsedPivotField[];
    rowFields: number[];
    colFields: number[];
    dataFields: ParsedDataField[];
    applyNumberFormats?: string;
    applyBorderFormats?: string;
    applyFontFormats?: string;
    applyPatternFormats?: string;
    applyAlignmentFormats?: string;
    applyWidthHeightFormats?: string;
    dataCaption?: string;
    styleName?: string;
    updatedVersion?: string;
    minRefreshableVersion?: string;
    createdVersion?: string;
    useAutoFormatting?: boolean;
    itemPrintTitles?: boolean;
    indent?: number;
    compact?: boolean;
    compactData?: boolean;
    multipleFieldFilters?: boolean;
    outline?: boolean;
    outlineData?: boolean;
    chartFormat?: number;
    rowItems?: RowColItem[];
    colItems?: RowColItem[];
    hasColFields?: boolean;
    chartFormats?: ChartFormatItem[];
    isLoaded?: boolean;
    extensions?: any[];
}
/**
 * Row or column item in pivot table
 */
interface RowColItem {
    t?: string;
    x: Array<{
        v: number;
    }>;
}
/**
 * Chart format item for pivot charts
 */
interface ChartFormatItem {
    chart: number;
    format: number;
    series?: boolean;
    pivotAreaXml?: string;
}
declare class PivotTableXform extends BaseXform {
    map: {
        [key: string]: any;
    };
    model: ParsedPivotTableModel | null;
    private state;
    private currentPivotField;
    private currentRowItem;
    private currentColItem;
    private currentChartFormat;
    private pivotAreaXmlBuffer;
    private pivotAreaDepth;
    constructor();
    prepare(_model: any): void;
    get tag(): string;
    reset(): void;
    /**
     * Render pivot table XML.
     * Supports both newly created models and loaded models.
     */
    render(xmlStream: any, model: PivotTableModel | ParsedPivotTableModel): void;
    /**
     * Render newly created pivot table
     */
    private renderNew;
    /**
     * Render loaded pivot table (preserving original structure)
     */
    private renderLoaded;
    /**
     * Render a row or column item element
     */
    private renderRowColItem;
    /**
     * Render a loaded pivot field
     */
    private renderPivotFieldLoaded;
    parseOpen(node: any): boolean;
    parseText(_text: string): void;
    parseClose(name: string): boolean;
    reconcile(_model: any, _options: any): void;
    static PIVOT_TABLE_ATTRIBUTES: {
        xmlns: string;
    };
}
export { PivotTableXform, type ParsedPivotTableModel };
