import type { WorkBook, WorkSheet } from 'xlsx';
import { F_PURCHASE_ORDER_TRANSACTION_TYPE } from '@feedmepos/zod-inventory';
import type { z } from 'zod';
import type { RevisionIdMeta } from '@feedmepos/inventory-core';
export declare enum ReservedSheetNames {
    Source = "Source",
    Destination = "Destination",
    Ingredient = "Ingredient"
}
export interface TemplateItemRow {
    code: string;
    overrideCode?: string;
    name: string;
    /** abbrev for base unit or measurement unit */
    unit: string;
    defaultQuantity: number;
    minimumQuantity: number;
    maximumQuantity: number;
    quantityStep: number;
}
export interface TemplateInfo {
    id: string;
    name: string;
    type: z.infer<typeof F_PURCHASE_ORDER_TRANSACTION_TYPE>;
    transferFrom: string;
    reference: string;
    remark: string;
    locations: string[];
}
export interface ImportCreateResult {
    type: 'create';
    template: Omit<FdoPurchaseOrderTemplate, '_id'>;
    excelSheetName: string;
    errors: string[];
}
export interface ImportUpdateResult {
    type: 'update';
    original: FdoPurchaseOrderTemplate;
    template: FdoPurchaseOrderTemplate & RevisionIdMeta;
    excelSheetName: string;
    errors: string[];
}
export type ImportResult = {
    invalidExcel: boolean;
    invalidExcelMessage?: string;
    importCreateResult: ImportCreateResult[];
    importUpdateResult: ImportUpdateResult[];
};
export type ObjectWithIndex<T> = {
    index: number;
    data: T;
};
export declare const FakeUnit: FdoInventoryUnit;
export declare function templateItemToExcelRow(item: FdoPurchaseOrderTemplateItem): TemplateItemRow;
export type ColIdHeader<T> = {
    id: keyof T;
    name: string;
};
export declare function getExcelHeaders(): ColIdHeader<TemplateItemRow>[];
export declare function exportTemplates(templates: FdoPurchaseOrderTemplate[]): string;
export declare function exportImportTemplate(): string;
export declare function extractTransferFrom(transferFrom: string, transferType: z.infer<typeof F_PURCHASE_ORDER_TRANSACTION_TYPE>): {
    from?: FdoPurchaseOrderSupplier;
    errors: string[];
};
/** @returns empty array if for all locations */
export declare function extractLocations(locationRow: string[]): {
    location?: FdoInventoryLocation;
    errors: string[];
}[];
export declare function worksheetToTemplateMeta(sheet: WorkSheet): TemplateInfo;
export declare function worksheetToSkuRow(sheet: WorkSheet): ObjectWithIndex<TemplateItemRow>[];
export declare function excelTemplateItemToTemplateItem(row: TemplateItemRow, index: number, parsedContent: ObjectWithIndex<TemplateItemRow>[]): {
    index: number;
    errors: string[];
    templateItem?: FdoPurchaseOrderTemplateItem;
};
export declare function getSkuToCreateUpdate(workbook: WorkBook): ImportResult;
