import * as xlsx from 'xlsx';
import type { NutrientResult } from '@modusjs/units';
import type { InputFile, SupportedFileType } from './json.js';
import ModusResult from '@oada/types/modus/v1/modus-result.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 parse({ wb, str, arrbuf, base64, format, lab, labConfigs, allowOverrides, }: {
    wb?: xlsx.WorkBook;
    str?: string;
    arrbuf?: ArrayBuffer;
    base64?: string;
    format?: 'generic';
    lab?: LabConfig | keyof typeof labConfigsMap.keys;
    labConfigs?: LabConfig[];
    allowOverrides?: boolean;
}): ModusResult[];
export declare function prep({ wb, str, arrbuf, base64, format, lab, labConfigs, }: {
    wb?: xlsx.WorkBook;
    str?: string;
    arrbuf?: ArrayBuffer;
    base64?: string;
    format?: 'generic';
    lab?: LabConfig | keyof typeof labConfigsMap.keys;
    labConfigs?: LabConfig[];
}): 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;
};
export declare function parseColumnHeaderName(original: string, labConfig?: LabConfig): ColumnHeader;
export declare type ToCsvOpts = {
    ssurgo?: boolean;
};
export declare function toCsv(input: ModusResult | ModusResult[], opts?: ToCsvOpts): {
    wb: xlsx.WorkBook;
    str: string;
};
export declare function toCsvObject(input: ModusResult, separateMetadata?: boolean): any[];
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 fixModus(modus: ModusResult): ModusResult;
export declare function fixDepthUnits(modus: ModusResult): ModusResult;
export declare function setModusNRUnits(modus: ModusResult, units?: NutrientResult[]): ModusResult;
