import * as xlsx from 'xlsx';
import type { NutrientResult } from '@modusjs/units';
import type { InputFile, SupportedFileType } from './json.js';
import Slim from '@oada/types/modus/slim/v1/0.js';
import type { LabConfig } from './labs/index.js';
import { labConfigsMap } from './labs/index.js';
export * as labs from './labs/index.js';
export declare const supportedFormats: string[];
export declare type SupportedFormats = 'generic';
export declare function parseWorkbook({ wb, str, arrbuf, base64, }: {
    wb?: xlsx.WorkBook;
    str?: string;
    arrbuf?: ArrayBuffer;
    base64?: string;
}): xlsx.WorkBook;
export declare function parseCsv({ wb, str, arrbuf, base64, format, lab, labConfigs, filename, allowOverrides, }: {
    wb?: xlsx.WorkBook;
    str?: string;
    arrbuf?: ArrayBuffer;
    base64?: string;
    format?: 'generic';
    lab?: LabConfig | keyof typeof labConfigsMap.keys;
    labConfigs?: LabConfig[];
    filename?: string;
    allowOverrides?: boolean;
}): Slim[];
export declare function prep({ wb, str, arrbuf, base64, format, lab, labConfigs, filename, }: {
    wb?: xlsx.WorkBook;
    str?: string;
    arrbuf?: ArrayBuffer;
    base64?: string;
    format?: 'generic';
    lab?: LabConfig | keyof typeof labConfigsMap.keys;
    labConfigs?: LabConfig[];
    filename?: string;
}): WorkbookInfo;
export declare function partitionSheets(wb: xlsx.WorkBook): {
    datasheets: DataSheet[];
    metadatasheet: MetaDataSheet | undefined;
};
declare type MetaDataSheet = {
    rows: any[];
    sheetname: string;
};
declare type DataSheet = {
    colnames: string[];
    allrows: any[];
    rows: any[];
    sheetname: string;
};
export declare function getOrAutodetectLab({ datasheets, allowImprovise, labConfigs, }: {
    datasheets: DataSheet[];
    allowImprovise?: boolean;
    labConfigs?: LabConfig[];
}): LabConfig | undefined;
export declare type WorkbookInfo = {
    datasheets: DataSheet[];
    labConfig?: LabConfig;
    pointMeta?: Record<string, any>;
};
declare type ColumnHeader = {
    original: string;
    element: string;
    modusid?: string;
    units?: string;
    nutrientResult: NutrientResult;
    unitsOverride?: string;
    convertedTo?: string;
};
export declare function parseColumnHeaderName(original: string, labConfig?: LabConfig): ColumnHeader;
export declare function handleExtraHeaders(row: any, labConfig: LabConfig): void;
export declare function toLabConfig(files: InputFile[] | InputFile, labConfigs?: LabConfig[]): Promise<LabConfigResult[]>;
export declare type LabConfigResult = {
    original_filename: string;
    original_type: SupportedFileType;
    labConfig?: LabConfig;
};
export declare type FilenameArgs = {
    wbinfo: WorkbookInfo;
    index?: number;
    filename: string;
    type: SupportedFileType;
};
export declare function setPath(output: any, outPath: string, data: any, condition?: boolean): void;
