interface Validation {
    idx: number;
    message: string;
}
export interface SdUploadExcelOption<T = any> {
    title?: string;
    note?: string;
    fileName?: string;
    columns?: SdUploadExcelColumn<T>[];
    limit?: number;
    key?: string;
    sheets?: {
        name: string;
        items: any[] | (() => Promise<any[]>);
        fields: string[];
    }[];
    onAccept?: (items?: T[], successItems?: T[], errorItems?: T[], warningItems?: T[], file?: File) => void | Promise<void>;
    mappingItems?: (items: SdExcelItem<T>[]) => SdExcelItem<T>[] | Promise<SdExcelItem<T>[]>;
    errorValidation?: (items?: T[]) => Validation[] | Promise<Validation[]>;
    warningValidation?: (items?: T[]) => Validation[] | Promise<Validation[]>;
}
export interface SdUploadExcelSheet {
    name: string;
    items: any[] | (() => Promise<any[]>);
    fields: string[];
}
export declare type SdUploadExcelColumn<T = any> = SdUploadExcelColumnString<T> | SdUploadExcelColumnNumber<T> | SdUploadExcelColumnBool<T> | SdUploadExcelColumnDate<T> | SdUploadExcelColumnTime<T> | SdUploadExcelColumnDateTime<T> | SdUploadExcelColumnValues<T> | SdUploadExcelColumnStringArray<T>;
export interface SdUploadExcelBaseColumn<T = any> {
    field: string;
    title: string;
    required?: boolean;
    width?: string;
    description?: string;
    hidden?: boolean | (() => boolean);
    fontColor?: string;
    fill?: string;
    transform?: (rowData: T, value: any) => string | Promise<string>;
    errorValidation?: (rowData?: T, value?: any, idx?: number) => string | Promise<string>;
    warningValidation?: (rowData?: T, value?: any, idx?: number) => string | Promise<string>;
}
export interface SdUploadExcelColumnString<T = any> extends SdUploadExcelBaseColumn<T> {
    type: 'string';
    defaultValue?: string;
    pattern?: string;
    minLength?: number;
    maxLength?: number;
}
export interface SdUploadExcelColumnNumber<T = any> extends SdUploadExcelBaseColumn<T> {
    type: 'number';
    defaultValue?: number;
    minValue?: number;
    maxValue?: number;
}
export interface SdUploadExcelColumnBool<T = any> extends SdUploadExcelBaseColumn<T> {
    type: 'bool';
    defaultValue?: boolean;
    parseToBool?: boolean;
}
export interface SdUploadExcelColumnDate<T = any> extends SdUploadExcelBaseColumn<T> {
    type: 'date';
    format?: 'dd/MM/yyyy';
    defaultValue?: Date;
    minDate?: Date;
    maxDate?: Date;
}
export interface SdUploadExcelColumnTime<T = any> extends SdUploadExcelBaseColumn<T> {
    type: 'time';
    format?: 'HH:mm' | 'HH:mm:ss';
    defaultValue?: Date;
    minDate?: Date;
    maxDate?: Date;
}
export interface SdUploadExcelColumnDateTime<T = any> extends SdUploadExcelBaseColumn<T> {
    type: 'datetime';
    format?: 'dd/MM/yyyy HH:mm' | 'dd/MM/yyyy';
    defaultValue?: Date;
    minDate?: Date;
    maxDate?: Date;
}
export interface SdUploadExcelColumnValues<T = any> extends SdUploadExcelBaseColumn<T> {
    type: 'values' | 'radio';
    defaultValue?: string | number;
    values: (string | number)[];
    checkValueInArray?: boolean;
}
export interface SdUploadExcelColumnStringArray<T = any> extends SdUploadExcelBaseColumn<T> {
    type: 'array';
    divideString: string | ';';
    unitString: string | 'items';
    defaultValue?: string;
    minLength?: number;
    maxLength?: number;
}
export interface SdUploadExcelValidation {
    error?: string;
    warning?: string;
    success?: string;
    data?: {
        [column: string]: {
            error?: string;
            warning?: string;
        };
    };
}
export declare type SdExcelItem<T = any> = {
    data: T;
    sd?: {
        excelIndex?: number;
        origin?: T;
        validation?: SdUploadExcelValidation;
    };
};
export {};
