import { type CellNumberFormatRecord, type CellRangeRef, type CellStyleRecord, type SheetFormatRangeSnapshot, type SheetStyleRangeSnapshot } from '@bilig/protocol';
import type { WorkbookCellNumberFormatRecord, WorkbookCellStyleRecord, WorkbookFormatRangeRecord, WorkbookStyleRangeRecord } from './workbook-metadata-types.js';
interface WorkbookStyleFormatCatalog {
    cellStyles: Map<string, WorkbookCellStyleRecord>;
    styleKeys: Map<string, string>;
    cellNumberFormats: Map<string, WorkbookCellNumberFormatRecord>;
    numberFormatKeys: Map<string, string>;
}
interface WorkbookStyleFormatSheet {
    styleRanges: WorkbookStyleRangeRecord[];
    formatRanges: WorkbookFormatRangeRecord[];
}
export declare function upsertCellStyle(catalog: WorkbookStyleFormatCatalog, style: CellStyleRecord, bumpStyleId: (id: string) => void): WorkbookCellStyleRecord;
export declare function internCellStyle(catalog: WorkbookStyleFormatCatalog, style: Omit<WorkbookCellStyleRecord, 'id'>, defaultStyleId: string): WorkbookCellStyleRecord;
export declare function getCellStyle(catalog: WorkbookStyleFormatCatalog, id: string | undefined, defaultStyleId: string): WorkbookCellStyleRecord | undefined;
export declare function listCellStyles(catalog: WorkbookStyleFormatCatalog): WorkbookCellStyleRecord[];
export declare function upsertCellNumberFormat(catalog: WorkbookStyleFormatCatalog, format: CellNumberFormatRecord, bumpFormatId: (id: string) => void): WorkbookCellNumberFormatRecord;
export declare function internCellNumberFormat(catalog: WorkbookStyleFormatCatalog, format: string | CellNumberFormatRecord, defaultFormatId: string): WorkbookCellNumberFormatRecord;
export declare function getCellNumberFormat(catalog: WorkbookStyleFormatCatalog, id: string | undefined, defaultFormatId: string): WorkbookCellNumberFormatRecord | undefined;
export declare function listCellNumberFormats(catalog: WorkbookStyleFormatCatalog): WorkbookCellNumberFormatRecord[];
export declare function setStyleRange(catalog: WorkbookStyleFormatCatalog, sheet: WorkbookStyleFormatSheet, range: CellRangeRef, styleId: string, defaultStyleId: string): WorkbookStyleRangeRecord;
export declare function listStyleRanges(sheet: WorkbookStyleFormatSheet | undefined): WorkbookStyleRangeRecord[];
export declare function setStyleRanges(catalog: WorkbookStyleFormatCatalog, sheet: WorkbookStyleFormatSheet, ranges: readonly SheetStyleRangeSnapshot[]): WorkbookStyleRangeRecord[];
export declare function getStyleId(sheet: WorkbookStyleFormatSheet | undefined, row: number, col: number, defaultStyleId: string): string;
export declare function setFormatRange(catalog: WorkbookStyleFormatCatalog, sheet: WorkbookStyleFormatSheet, range: CellRangeRef, formatId: string, defaultFormatId: string): WorkbookFormatRangeRecord;
export declare function listFormatRanges(sheet: WorkbookStyleFormatSheet | undefined): WorkbookFormatRangeRecord[];
export declare function setFormatRanges(catalog: WorkbookStyleFormatCatalog, sheet: WorkbookStyleFormatSheet, ranges: readonly SheetFormatRangeSnapshot[]): WorkbookFormatRangeRecord[];
export declare function getRangeFormatId(sheet: WorkbookStyleFormatSheet | undefined, row: number, col: number, defaultFormatId: string): string;
export declare function coalesceStyleRanges(sheet: WorkbookStyleFormatSheet): WorkbookStyleRangeRecord[];
export {};
