/**
 * CSV class - Cross-Platform Base Implementation
 *
 * Provides CSV read/write functionality for both Node.js and Browser.
 * Node.js version (csv.ts) extends this with file system support.
 */
import { type DateFormat } from "@utils/datetime";
import { type CsvParseOptions, type CsvFormatOptions } from "@csv/csv-core";
import { type DecimalSeparator } from "@csv/csv-number";
import type { IReadable, IWritable } from "@stream/types";
import type { Workbook } from "@excel/workbook";
import type { Worksheet } from "@excel/worksheet";
export interface CsvReadOptions {
    dateFormats?: readonly DateFormat[];
    map?(value: any, index: number): any;
    sheetName?: string;
    parserOptions?: Partial<CsvParseOptions>;
    /** Options for the default value mapper (string -> number/date/etc). */
    valueMapperOptions?: DefaultValueMapperOptions;
}
export interface CsvWriteOptions {
    dateFormat?: string;
    dateUTC?: boolean;
    sheetName?: string;
    sheetId?: number;
    encoding?: string;
    map?(value: any, index: number): any;
    includeEmptyRows?: boolean;
    formatterOptions?: Partial<CsvFormatOptions>;
}
export interface CsvStreamReadOptions extends CsvReadOptions {
    highWaterMark?: number;
}
export interface CsvStreamWriteOptions extends CsvWriteOptions {
    highWaterMark?: number;
}
export interface DefaultValueMapperOptions {
    decimalSeparator?: DecimalSeparator;
}
export declare function createDefaultValueMapper(dateFormats: readonly DateFormat[], options?: DefaultValueMapperOptions): (datum: any) => any;
export declare function createDefaultWriteMapper(dateFormat?: string, dateUTC?: boolean): (value: any) => any;
declare class CSV {
    workbook: Workbook;
    constructor(workbook: Workbook);
    load(content: string | ArrayBuffer | Uint8Array, options?: CsvReadOptions): Worksheet;
    writeString(options?: CsvWriteOptions): string;
    writeBuffer(options?: CsvWriteOptions): Promise<Uint8Array>;
    read(stream: IReadable<any>, options?: CsvReadOptions): Promise<Worksheet>;
    write(stream: IWritable<any>, options?: CsvWriteOptions): Promise<void>;
    createReadStream(options?: CsvWriteOptions): IReadable<any>;
    createWriteStream(options?: CsvReadOptions): IWritable<any>;
    readFile(_filename: string, _options?: CsvStreamReadOptions): Promise<Worksheet>;
    writeFile(_filename: string, _options?: CsvStreamWriteOptions): Promise<void>;
}
export declare function parseCsvToWorksheet(content: string, workbook: Workbook, options?: CsvReadOptions): Worksheet;
export declare function formatWorksheetToCsv(worksheet: Worksheet | undefined, options?: CsvWriteOptions): string;
export { CSV };
export { CsvParserStream, CsvFormatterStream } from "@csv/csv-stream";
export { parseCsv, formatCsv } from "@csv/csv-core";
export type { CsvParseOptions, CsvFormatOptions } from "@csv/csv-core";
