import type { CellRangeRef, CellStyleRecord, LiteralInput, SheetMetadataSnapshot, WorkbookAxisEntrySnapshot, WorkbookCalculationSettingsSnapshot, WorkbookChartSnapshot, WorkbookConditionalFormatSnapshot, WorkbookDataValidationSnapshot, WorkbookDefinedNameValueSnapshot, WorkbookFreezePaneSnapshot, WorkbookPivotSnapshot, WorkbookRangeProtectionSnapshot, WorkbookSheetProtectionSnapshot, WorkbookSortSnapshot, WorkbookSnapshot, WorkbookTableSnapshot } from '@bilig/protocol';
type WorkbookSheetSnapshot = WorkbookSnapshot['sheets'][number];
type WorkbookAxisEntrySemantics = Omit<WorkbookAxisEntrySnapshot, 'id'>;
type WorkbookSheetMetadataSemantics = Omit<SheetMetadataSnapshot, 'rows' | 'columns'> & {
    rows?: WorkbookAxisEntrySemantics[];
    columns?: WorkbookAxisEntrySemantics[];
};
export interface WorkbookSemanticComparableSnapshot extends Omit<WorkbookSnapshot, 'sheets'> {
    sheets: Array<Omit<WorkbookSheetSnapshot, 'metadata'> & {
        metadata?: WorkbookSheetMetadataSemantics;
    }>;
}
export interface ProjectedWorkbookChartSemantics {
    readonly id: string;
    readonly sheetName: string;
    readonly address: string;
    readonly source: CellRangeRef;
    readonly chartType: WorkbookChartSnapshot['chartType'];
    readonly seriesOrientation: WorkbookChartSnapshot['seriesOrientation'];
    readonly firstRowAsHeaders?: boolean;
    readonly firstColumnAsLabels?: boolean;
    readonly title?: string;
    readonly legendPosition?: WorkbookChartSnapshot['legendPosition'];
    readonly anchor?: WorkbookChartSnapshot['anchor'];
    readonly rows: number;
    readonly cols: number;
}
export interface ProjectedWorkbookPortableStyle {
    readonly fill?: CellStyleRecord['fill'];
    readonly font?: CellStyleRecord['font'];
    readonly alignment?: CellStyleRecord['alignment'];
    readonly borders?: CellStyleRecord['borders'];
    readonly protection?: CellStyleRecord['protection'];
}
export interface ProjectedWorkbookStyleRangeSemantics {
    readonly range: CellRangeRef;
    readonly style: ProjectedWorkbookPortableStyle | undefined;
}
export interface ProjectedWorkbookValueFormulaFormatSheet {
    readonly name: string;
    readonly order: number;
    readonly cells: Array<{
        readonly address: string;
        readonly value?: WorkbookSnapshot['sheets'][number]['cells'][number]['value'];
        readonly formula?: string;
        readonly format?: string;
    }>;
}
interface ProjectedWorkbookDimensionAxisEntry {
    readonly index: number;
    readonly size?: number | null;
}
export interface ProjectedWorkbookDimensionSheet {
    readonly name: string;
    readonly columns: ProjectedWorkbookDimensionAxisEntry[];
    readonly rows: ProjectedWorkbookDimensionAxisEntry[];
    readonly merges: Array<{
        readonly sheetName: string;
        readonly startAddress: string;
        readonly endAddress: string;
    }>;
}
export interface WorkbookSemanticSnapshot {
    readonly properties: Array<{
        readonly key: string;
        readonly value: LiteralInput;
    }>;
    readonly calculationSettings: WorkbookCalculationSettingsSnapshot | undefined;
    readonly definedNames: Array<{
        readonly name: string;
        readonly value: WorkbookDefinedNameValueSnapshot;
    }>;
    readonly commentThreads: Array<{
        readonly sheetName: string;
        readonly address: string;
        readonly comments: Array<{
            readonly body: string;
            readonly authorDisplayName?: string;
        }>;
    }>;
    readonly styleRanges: ProjectedWorkbookStyleRangeSemantics[];
    readonly tables: WorkbookTableSnapshot[];
    readonly charts: ProjectedWorkbookChartSemantics[];
    readonly pivots: WorkbookPivotSnapshot[];
    readonly validations: WorkbookDataValidationSnapshot[];
    readonly conditionalFormats: ReturnType<typeof projectConditionalFormatSemantics>[];
    readonly freezePanes: Array<{
        readonly sheetName: string;
        readonly freezePane: WorkbookFreezePaneSnapshot;
    }>;
    readonly filters: Array<{
        readonly sheetName: string;
        readonly startAddress: string;
        readonly endAddress: string;
    }>;
    readonly sorts: WorkbookSortSnapshot[];
    readonly sheetProtections: WorkbookSheetProtectionSnapshot[];
    readonly protectedRanges: WorkbookRangeProtectionSnapshot[];
    readonly valueFormulaFormatSheets: ProjectedWorkbookValueFormulaFormatSheet[];
    readonly dimensionSheets: ProjectedWorkbookDimensionSheet[];
}
export declare function normalizeWorkbookSnapshotForSemanticComparison(snapshot: WorkbookSnapshot): WorkbookSemanticComparableSnapshot;
export declare function projectWorkbookSemanticSnapshot(snapshot: WorkbookSnapshot): WorkbookSemanticSnapshot;
declare function projectConditionalFormatSemantics(format: WorkbookConditionalFormatSnapshot): {
    priority?: number;
    stopIfTrue?: boolean;
    range: CellRangeRef;
    rule: import("@bilig/protocol").WorkbookConditionalFormatRuleSnapshot;
    style: import("@bilig/protocol").CellStylePatch;
};
export {};
