import { RawElement } from '../types/raw';
import { Wbody } from './Wbody';
import { Wtr } from './Wtr';
import { Wtc } from './Wtc';
import { ModelGroup, ModelGroupOptions } from '../base';
import { TableRegion, BoundedRegionOptions, RepeatingRegionOptions, BoundedRegion, RepeatingRegion } from '../logic';
import { WtblPr } from './WtblPr';
/**
 * Wtbl 构造参数
 */
export interface WtblOptions {
    rows: Wtr[];
    colWidths?: number[];
    tableProperties?: any;
    attrs?: any;
    style?: any;
    rawProperties?: any;
    id?: string;
}
export declare class Wtbl extends ModelGroup {
    name: 'w:tbl';
    type: "element";
    sectionId?: string;
    rawProperties?: any;
    colWidths?: number[];
    tableProperties?: any;
    parent?: Wbody;
    children: Wtr[];
    regions: TableRegion[];
    private pendingRecalculate;
    tblPr?: WtblPr;
    constructor(options: ModelGroupOptions & {
        colWidths?: number[];
        tblPr?: WtblPr;
    });
    get rows(): Wtr[];
    get repeating(): RepeatingRegion[];
    getRepeatingById(id: string): RepeatingRegion | undefined;
    get hasRepeating(): boolean;
    get bounded(): BoundedRegion[];
    getBoundedById(id: string): BoundedRegion | undefined;
    get hasBounded(): boolean;
    /**
     * 请求延迟重算
     * 在微任务队列中安排一次重算，同一事件循环内的多次操作会自动合并
     */
    scheduleRecalculate(): void;
    static fromXmlJson(json: RawElement): Wtbl;
    toXmlJson(): RawElement;
    /**
     * 在指定行索引处拆分表格
     * @param index 拆分位置（在此行之前分割）
     * @returns 返回 [beforeTable, afterTable]，边界情况返回 null
     * @example
     * const [before, after] = table.splitAt(3);
     * // before: 包含前 3 行的表格，after: 包含剩余行的表格
     */
    splitAt(index: number): [Wtbl | null, Wtbl | null];
    setRepeating(options: Omit<RepeatingRegionOptions, 'table'>): RepeatingRegion;
    setBounded(options: Omit<BoundedRegionOptions, 'table'>): BoundedRegion;
    /**
     * 根据 region id 查找对应的 region
     */
    findRegionById(regionId: string): TableRegion | undefined;
    /**
     * 根据 region id 删除对应的 region
     */
    deleteRegionById(regionId: string): void;
    forEachCell(options: {
        startRowIdx: number;
        startColIdx: number;
        endRowIdx: number;
        endColIdx: number;
        callback: (cell: Wtc, rowIdx: number, colIdx: number) => void;
        filter?: (cell: Wtc) => boolean;
    }): void;
    getCellCount(options: {
        startRowIdx: number;
        startColIdx: number;
        endRowIdx: number;
        endColIdx: number;
    }): number;
    static fromTemplate(rowCount: number, colWidths: number[]): Wtbl;
    insertRowAt(index: number): void;
    insertRowBefore(index: number): void;
    insertRowAfter(index: number): void;
    insertColAt(index: number): void;
    insertColBefore(index: number): void;
    insertColAfter(index: number): void;
    deleteRowAt(index: number): void;
    deleteRowRange(startIndex: number, endIndex: number): void;
    deleteColAt(index: number): void;
    deleteColRange(startIndex: number, endIndex: number): void;
    resizeCol(colIndex: number, width: number): void;
    resizeRow(rowIndex: number, height: number): void;
}
