import { Dimensions } from "../range.js";
import { StringBuf } from "../utils/string-buf.js";
import { Row } from "../row.js";
import { Column } from "../column.js";
import { SheetRelsWriter } from "./sheet-rels-writer.js";
import { SheetCommentsWriter } from "./sheet-comments-writer.js";
import { DataValidations } from "../data-validations.js";
import type { StreamBuf } from "../utils/stream-buf.js";
import type { RowBreak, ColBreak, PageSetup, HeaderFooter, WorksheetProperties, WorksheetView, WorksheetState, AutoFilter, WorksheetProtection, ConditionalFormattingOptions } from "../types.js";
interface WorksheetWriterOptions {
    id: number;
    name?: string;
    workbook: any;
    useSharedStrings?: boolean;
    properties?: Partial<WorksheetProperties>;
    state?: WorksheetState;
    pageSetup?: Partial<PageSetup>;
    views?: Partial<WorksheetView>[];
    autoFilter?: AutoFilter;
    headerFooter?: Partial<HeaderFooter>;
}
declare class WorksheetWriter {
    id: number;
    name: string;
    state: WorksheetState;
    /** Rows stored while being worked on. Set to null after commit. */
    _rows: Row[] | null;
    /** Column definitions */
    _columns: Column[] | null;
    /** Column keys mapping: key => Column */
    _keys: {
        [key: string]: Column;
    };
    /** Merged cell ranges */
    _merges: Dimensions[];
    _sheetRelsWriter: SheetRelsWriter;
    _sheetCommentsWriter: SheetCommentsWriter;
    _dimensions: Dimensions;
    _rowZero: number;
    _rowOffset: number;
    committed: boolean;
    dataValidations: DataValidations;
    /** Shared formulae by address */
    _formulae: {
        [key: string]: unknown;
    };
    _siFormulae: number;
    conditionalFormatting: ConditionalFormattingOptions[];
    rowBreaks: RowBreak[];
    colBreaks: ColBreak[];
    properties: Partial<WorksheetProperties> & {
        defaultRowHeight: number;
        dyDescent?: number;
        outlineLevelCol: number;
        outlineLevelRow: number;
    };
    headerFooter: Partial<HeaderFooter>;
    pageSetup: Partial<PageSetup> & {
        margins: PageSetup["margins"];
    };
    useSharedStrings: boolean;
    _workbook: any;
    hasComments: boolean;
    _views: Partial<WorksheetView>[];
    autoFilter: AutoFilter | null;
    _media: unknown[];
    sheetProtection: {
        sheet?: boolean;
        algorithmName?: string;
        saltValue?: string;
        spinCount?: number;
        hashValue?: string;
        [key: string]: unknown;
    } | null;
    _stream?: InstanceType<typeof StreamBuf>;
    startedData: boolean;
    _background?: {
        imageId?: number;
        rId?: string;
    };
    _headerRowCount?: number;
    /** Relationship Id - assigned by WorkbookWriter */
    rId?: string;
    constructor(options: WorksheetWriterOptions);
    get workbook(): any;
    get stream(): any;
    destroy(): void;
    commit(): void;
    get dimensions(): Dimensions;
    get views(): Partial<WorksheetView>[];
    get columns(): Column[] | null;
    set columns(value: Partial<Column>[]);
    getColumnKey(key: string): Column | undefined;
    setColumnKey(key: string, value: Column): void;
    deleteColumnKey(key: string): void;
    eachColumnKey(f: (column: Column, key: string) => void): void;
    getColumn(c: string | number): Column;
    get _nextRow(): number;
    eachRow(options: {
        includeEmpty?: boolean;
    } | ((row: Row, rowNumber: number) => void), iteratee?: (row: Row, rowNumber: number) => void): void;
    _commitRow(cRow: Row): void;
    get lastRow(): Row | undefined;
    findRow(rowNumber: number): Row | undefined;
    getRow(rowNumber: number): Row;
    addRow(value: any[] | Record<string, any>): Row;
    findCell(r: string | number, c?: number): any;
    getCell(r: string | number, c?: number): any;
    mergeCells(...cells: (string | number)[]): void;
    addConditionalFormatting(cf: ConditionalFormattingOptions): void;
    removeConditionalFormatting(filter?: number | ((cf: ConditionalFormattingOptions) => boolean)): void;
    addBackgroundImage(imageId: number): void;
    getBackgroundImageId(): number | undefined;
    protect(password?: string, options?: Partial<WorksheetProtection>): Promise<void>;
    unprotect(): void;
    _write(text: string): void;
    _writeSheetProperties(xmlBuf: StringBuf, properties: Partial<WorksheetProperties> | undefined, pageSetup: Partial<PageSetup> | undefined): void;
    _writeSheetFormatProperties(xmlBuf: StringBuf, properties: Partial<WorksheetProperties> | undefined): void;
    _writeOpenWorksheet(): void;
    _writeColumns(): void;
    _writeOpenSheetData(): void;
    _writeRow(row: any): void;
    _writeCloseSheetData(): void;
    _writeMergeCells(): void;
    _writeHyperlinks(): void;
    _writeConditionalFormatting(): void;
    _writeRowBreaks(): void;
    _writeColBreaks(): void;
    _writeDataValidations(): void;
    _writeSheetProtection(): void;
    _writePageMargins(): void;
    _writePageSetup(): void;
    _writeHeaderFooter(): void;
    _writeAutoFilter(): void;
    _writeBackground(): void;
    _writeLegacyData(): void;
    _writeDimensions(): void;
    _writeCloseWorksheet(): void;
}
export { WorksheetWriter };
