import { SubDocument } from '../../../../model/sub-document';
import { Table } from '../../../../model/tables/main-structures/table';
import { TableWidthUnit } from '../../../../model/tables/secondary-structures/table-units';
import { BoxIterator } from '../../../box/box-iterator';
import { Columns } from '../columns';
import { Grid } from '../grid';
import { GridColumnBase } from './column-interval';
import { ColumnInterval } from './column-width-engine/column-interval';
import { TablePropertiesCache } from './table-properties-cache';
export declare abstract class GridCalculator<TColumnInterval extends GridColumnBase> {
    protected readonly accuracy = 8;
    protected readonly maxPercentWidth: number;
    static readonly minColumnWidth: number;
    protected cache: Record<number, TablePropertiesCache>;
    protected percentBaseWidth: number;
    protected maxTableWidth: number;
    protected grid: Grid;
    protected boxIterator: BoxIterator;
    protected columns: TColumnInterval[];
    protected numIntervalsInModelUnits: number;
    protected numIntervalsInPercents: number;
    protected numIntervalsAsAuto: number;
    protected numIntervalsAsNil: number;
    protected widthInModelUnits: number;
    protected widthInPercents: number;
    protected get table(): Table;
    protected get currCache(): TablePropertiesCache;
    protected get subDocument(): SubDocument;
    constructor(grid: Grid, cache: Record<number, TablePropertiesCache>, boxIterator: BoxIterator, avaliableSpacing: number);
    protected convertTableWidthUnitToTwips(value: TableWidthUnit): number;
    protected abstract makeInterval(interval: ColumnInterval): TColumnInterval;
    protected abstract applyCellsWidth(intervals: ColumnInterval[]): any;
    protected getFixedTableWidthInTwips(): number;
    private calculateEstimatedTableWidth;
    getColumns(): Columns;
    protected autofitTable(): void;
    protected abstract autofitTail(totalWidth: number, estimatedTableWidth: number): any;
    private autofitNoSetWidthColumns;
    private compressWidthProportionallyOfDifferenceMaxAndMinWidth;
    private autofitPercentWidthColumns;
    private autofitModelUnitWidthColumns;
    private applyPrefferedWidth;
    private compressWidthProportionallyOfDifferencePreferredWidthAndMinWidth;
    private enlargeWidthProportionallyMaxWidth;
    protected compressTableGrid(newTableWidth: number): void;
    private compressProportionallyWidthCore;
    private changeColumnsProportionally;
}
