import * as React from 'react';
import React__default, { JSX, ReactNode, Dispatch, SetStateAction } from 'react';
import { UseFormSetValue, UseFormGetValues, UseFormReset, Control, UseFormWatch, FieldErrors } from 'react-hook-form';
import { TFunction } from 'react-i18next';
import * as react_jsx_runtime from 'react/jsx-runtime';

type IFColumnSelectTable = {
    field: string;
    headerText: string;
    visible?: boolean;
    textAlign?: 'left' | 'right' | 'center';
    type?: 'text' | 'numeric' | 'date' | 'datetime';
    template?: any;
    typeCondition?: any;
    fraction?: number;
    width?: number;
    maxWidth?: number;
    minWidth?: number;
};
type IFTableSelectFormat = {
    dateFormat?: string;
    datetimeFormat?: string;
    decimalSeparator?: string;
    thousandSeparator?: string;
    colorNegative?: string;
    prefixNegative?: string;
    suffixNegative?: string;
};
type Props$1 = {
    id?: string;
    value: any;
    options: any[];
    fieldValue?: string;
    fieldLabel?: string;
    textAlign?: 'left' | 'right' | 'center';
    placeholder?: string;
    invalid?: boolean;
    menuWidth?: number;
    width?: number;
    isMulti?: boolean;
    noHeader?: boolean;
    maxHeight?: number;
    columns?: IFColumnSelectTable[];
    isClearable?: boolean;
    isDisabled?: boolean;
    allowCreate?: boolean;
    showFooter?: boolean;
    formatSetting?: IFTableSelectFormat;
    component?: string | HTMLElement | React__default.RefObject<HTMLElement> | undefined;
    formatOptionLabel?: (ele: any) => JSX.Element;
    loadOptions?: (keyword: string, callback: (rs: any[]) => void) => void;
    onKeyDown?: (e: React__default.KeyboardEvent<HTMLInputElement>) => any;
    onOpenMenu?: () => void;
    handleAdd?: (e?: any) => void;
    onPaste?: (e: React__default.ClipboardEvent<HTMLInputElement>) => void;
    onCloseMenu?: () => void;
    footerComponent?: () => JSX.Element;
    onChange: (val: any) => void;
};
declare const SelectTable: React__default.ForwardRefExoticComponent<Props$1 & React__default.RefAttributes<unknown>>;

type FromItemsField = {
    name: string;
    label: string;
    type: 'text' | 'numeric' | 'select' | 'selectCreatable';
    disabled?: boolean;
    fraction?: number;
    min?: number;
    max?: number;
    options?: any[];
};

type ITextAlign = 'center' | 'left' | 'right';
type IEditType = 'text' | 'numeric' | 'datetime' | 'selectTree' | 'date' | 'select' | 'checkbox' | 'form' | 'color';
type ICommandItem = {
    id: string;
    color?: string;
    tooltip?: string;
    icon?: string;
    commandTemplate?: ReactNode;
};
type IFToolbarOptions = {
    align: 'left' | 'right' | 'center';
    template: any;
};
type ISettingFormElement = {
    schema: any;
    labelSize?: 'label-small' | 'label-medium' | 'label-large';
    menuWidth?: number;
    menuHeight?: number;
    displayValue?: any;
    openOnFocus?: boolean;
    isClearable?: boolean;
    onFormOpen?: (rowData: any, itemsField: FromItemsField[], setItemsField: Dispatch<SetStateAction<FromItemsField[]>>) => void;
    onFormSubmit?: (rowData: any, setValue: UseFormSetValue<any>, getValues: UseFormGetValues<any>, reset: UseFormReset<any>) => void;
    footerTemplate?: (rowData: any) => JSX.Element;
    onChangeField?: (rowData: any, field: string, setValue: UseFormSetValue<any>, getValues: UseFormGetValues<any>) => void;
    onChange?: (rowData: any) => void;
};
type ISettingSelectElement = {
    isClearable?: boolean;
    isMulti?: boolean;
    noHeader?: boolean;
    showFooter?: boolean;
    selectChilds?: boolean;
    allowCreate?: boolean;
    defaultValue?: any;
    fieldValue?: string;
    fieldLabel?: string;
    fieldChild?: string;
    options?: any[];
    widthPopup?: string | number;
    heightPopup?: string | number;
    iconGroup?: string;
    handAddNew?: any;
    validateOption?: any;
    optionsField?: string;
    columns?: IFColumnSelectTable[];
    formatOptionLabel?: (ele: any) => JSX.Element;
    footerComponent?: () => JSX.Element;
    loadOptions?: (keyword: string, callback: (rs: any[]) => void) => void;
    onOpenMenu?: (row: any, col: IColumnTable, indexRow: number) => void;
};
type ISettingNumericElement = {
    min?: number;
    max?: number;
    fraction?: number;
    allowNegative?: boolean;
};
type IColumnTable = {
    field: string;
    headerText?: string;
    isPrimarykey?: boolean;
    isUnikey?: boolean;
    haveSum?: boolean;
    haveToolTip?: boolean;
    width?: number | string;
    minWidth?: number | string;
    maxWidth?: number | string;
    editEnable?: boolean;
    visible?: boolean;
    invisibleDisable?: boolean;
    editType?: IEditType;
    textAlign?: ITextAlign;
    fixedType?: 'left' | 'right' | undefined;
    commandItems?: ICommandItem[];
    placeholder?: string;
    numericSettings?: ISettingNumericElement;
    selectSettings?: ISettingSelectElement;
    formSettings?: ISettingFormElement;
    columns?: IColumnTable[];
    disablePaste?: boolean;
    validate?: (value: any, row: any) => string | undefined;
    disabledCondition?: (row: any) => boolean;
    callback?: (value: any, indexRow: number, item: any) => void;
    template?: (row: any, indexRow: number) => JSX.Element | string | number | undefined;
    editTypeCondition?: (row: any) => string;
    onPaste?: (dataRow: any, dataPaste: any) => void;
    onPasteValidate?: (dataPaste: string, dataRow: any, rowIndex: number) => Promise<any>;
};
type IFTableEditPaging = {
    allowPaging?: boolean;
    pagingClient?: boolean;
    currentPage?: number;
    setCurrentPage?: Dispatch<SetStateAction<number>>;
    setPageSize?: Dispatch<SetStateAction<number>>;
    pageSize?: number;
    totalItem?: number;
    pageOptions?: number[];
};
type IFTableEditButton = {
    deleteAllDisable?: boolean;
    insertAfterDisable?: boolean;
    insertBeforeDisable?: boolean;
    duplicateDisable?: boolean;
};
type IFTableEditToolbar = {
    showTopToolbar?: boolean;
    toolbarOptions?: IFToolbarOptions[];
    toolbarBottomOptions?: IFToolbarOptions[];
    showBottomToolbar?: boolean;
};
type IFTableEditSearchSetting = {
    searchEnable?: boolean;
    searchClient?: boolean;
    searchTerm?: string;
    keyField?: string[];
    setSearchTerm?: Dispatch<SetStateAction<string>>;
};
type IFTableEditFormat = {
    dateFormat?: string;
    datetimeFormat?: string;
    decimalSeparator?: string;
    thousandSeparator?: string;
    colorNegative?: string;
    prefixNegative?: string;
    suffixNegative?: string;
};
type IFPageSize = {
    pageSize: number;
};
type IFCurrentPage = {
    currentPage: number;
};
type IFCurrentPageConfig = {
    currentPage: number;
    oldPage: number;
};
type IHeaderColumnTable = {
    field: string;
    headerText?: string;
    width?: number | string;
    minWidth?: number | string;
    maxWidth?: number | string;
    visible?: boolean;
    rowspan?: number;
    columns?: IColumnTable[];
    textAlign?: ITextAlign;
    fixedType?: 'left' | 'right' | undefined;
    index?: number;
};

type IFTableEditProps = {
    idTable?: string;
    dataSource: any[];
    selectEnable?: boolean;
    defaultValue?: any;
    columns: IColumnTable[];
    height?: number;
    maxHeight?: number;
    minHeight?: number;
    isMulti?: boolean;
    editDisable?: boolean;
    addDisable?: boolean;
    haveSum?: boolean;
    disableAutoKey?: boolean;
    isTree?: boolean;
    fieldChildren?: string;
    formatSetting?: IFTableEditFormat;
    pagingSetting?: IFTableEditPaging;
    buttonSetting?: IFTableEditButton;
    toolbarSetting?: IFTableEditToolbar;
    searchSetting?: IFTableEditSearchSetting;
    selectedItem?: any;
    setDataSource?: any;
    setSelectedItem?: Dispatch<SetStateAction<any>>;
    commandClick?: (data: any) => void;
    handleSelect?: (data: any) => void;
    dataSourceChange?: (data: any[]) => void;
    rowChange?: (row: any, indexRow: number, field: string) => void;
    onDuplicate?: (newData: any, index: number) => void;
};
type IFRef = {
    refeshFocusRow: any;
};
declare const TableEdit: React.ForwardRefExoticComponent<IFTableEditProps & React.RefAttributes<IFRef>>;

declare const messageHtmlBoxConfirm: (t: TFunction<"translation", undefined>, message: any[], handle: any, data: any, title?: string, btnOk?: string, btnCancel?: string) => void;
declare const messageHtmlBoxError: (t: TFunction<"translation", undefined>, message: any[], title?: string, btnCancel?: string) => void;
declare const messageBoxConfirmDelete: (t: TFunction<"translation", undefined>, handle: any, data: any) => void;
declare const messageBoxConfirm: (t: TFunction<"translation", undefined>, handle: any, data: any, message: string, title?: string, btnOk?: string, btnCancel?: string) => void;
declare const messageBoxError: (t: TFunction<"translation", undefined>, message: string, title?: string, btnCancel?: string) => void;
declare const notificationError: (param: string) => string;
declare const notificationSuccess: (param: string) => string;
declare const messageBoxConfirm2: (t: TFunction<"translation", undefined>, data: any, data2: any, message: string) => Promise<boolean>;

declare const useOnClickOutside: (ref: any, handler: any) => void;
declare const checkThousandSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
declare const checkDecimalSeparator: (thousandSeparator: any, decimalSeparator: any) => any;
declare const isNullOrUndefined: (d: any) => boolean;
declare const generateUUID: () => string;
/**
 * format chuỗi kí tự số
 * @param str chuỗi số cần format
 * @param decimalSeparator kí tự thập phân
 * @param thousandSeparator kí tự phân cách hàng nghìn
 * @param fraction số kí tự thập phân
 * @param isDone đã nhập xong
 * @returns
 */
declare const formartNumberic: (str: string | number, decimalSeparator: string, thousandSeparator: string, fraction?: number, isDone?: boolean, haveNegative?: boolean) => string;
declare const roundNumber: (num: number, fraction: number) => number;
declare const formatDateTime: (data: any, format?: string) => string;
declare const FindNodeByPath: (tree: any[], path: string) => {
    parent: any[];
    lastIndex: number | undefined;
    firstIndex: number;
    node: any;
} | null;

type IFDataProps$1 = {
    buttonWidth?: number;
    tabParent?: boolean;
    tabChild?: boolean;
    resourceCodeParent?: string;
    resourceCode: string;
    resources: any[];
    renderModal?: any;
    windowSize?: any;
};
declare const TabsMenuComponent: ({ buttonWidth, tabParent, tabChild, resourceCodeParent, resources, resourceCode, windowSize, renderModal }: IFDataProps$1) => react_jsx_runtime.JSX.Element;

type IFColumnSelectTableTree = {
    field: string;
    headerText: string;
    visible?: boolean;
    textAlign?: 'left' | 'right' | 'center';
    type?: 'text' | 'numeric' | 'date' | 'datetime';
    template?: any;
    typeCondition?: any;
    fraction?: number;
    width?: number;
    maxWidth?: number;
    minWidth?: number;
};
type IFTableTreeSelectFormat = {
    dateFormat?: string;
    decimalSeparator?: string;
    thousandSeparator?: string;
    colorNegative?: string;
    prefixNegative?: string;
    suffixNegative?: string;
};
type Props = {
    id?: string;
    component?: any;
    footerComponent?: any;
    fieldValue?: string;
    fieldLabel?: string;
    onChange: any;
    textAlign?: 'left' | 'right' | 'center';
    placeholder?: string;
    invalid?: any;
    loadOptions?: any;
    menuWidth?: number;
    width?: number;
    rowData?: any;
    value: any;
    onKeyDown?: any;
    formatOptionLabel?: any;
    handleAdd?: any;
    options: any[];
    isMulti?: boolean;
    noHeader?: boolean;
    maxHeight?: number;
    columns?: IFColumnSelectTableTree[];
    fieldChildren?: string;
    isClearable?: boolean;
    isDisabled?: boolean;
    showFooter?: boolean;
    selectChilds?: boolean;
    formatSetting?: IFTableTreeSelectFormat;
    onOpenMenu?: any;
    onPaste?: any;
};
declare const SelectTableTree: React__default.ForwardRefExoticComponent<Props & React__default.RefAttributes<unknown>>;

interface IFDataStyleSetting {
    color: string;
    backgroundColor: string;
    fontFamily: string;
    fontSize: number;
    bold: boolean;
    italic: boolean;
    underline: boolean;
}
interface IFDataInputStyle {
    value: IFDataStyleSetting;
    onChange: any;
    disabled?: boolean;
    disabledColor?: boolean;
    disabledBackgroundColor?: boolean;
    disabledFontFamily?: boolean;
    disabledFontSize?: boolean;
    disabledBold?: boolean;
    disabledItalic?: boolean;
    disabledUnderline?: boolean;
}
declare const InputStyleComponent: (props: IFDataInputStyle) => react_jsx_runtime.JSX.Element;

type IFDataProps = {
    openModal: boolean;
    typeModal: string;
    handleModal: any;
    windowSize: any;
    dataItem: any;
    columns: any;
    setCheckDetailExport?: any;
    columnGroups?: any[];
};
declare const ExportExcelComponent: ({ openModal, typeModal, handleModal, windowSize, dataItem, columns, columnGroups }: IFDataProps) => react_jsx_runtime.JSX.Element;

interface IFDataExcel {
    step: number;
    file?: any;
    sheetId?: string;
    headerRow?: number;
    dataMap: IFDataMapExcel[];
}
interface IFDataMapExcel {
    field: string;
    headerDefault: string[];
    header: string;
    dataType: 'numeric' | 'string' | 'date' | 'datetime' | 'boolean';
    column?: string;
    disableEdit?: boolean;
    isRequired?: boolean;
}

type IFNumberFormat = {
    dateFormat?: string;
    decimalSeparator?: string;
    thousandSeparator?: string;
    colorNegative?: string;
    prefixNegative?: string;
    suffixNegative?: string;
};

interface IFPropsDetail {
    control: Control<IFDataExcel>;
    watch: UseFormWatch<IFDataExcel>;
    errors: FieldErrors<IFDataExcel>;
    setValue: UseFormSetValue<IFDataExcel>;
    getValues: UseFormGetValues<IFDataExcel>;
    formatNumber?: IFNumberFormat;
    pageOptions: number[];
    pageSizeDefault: number;
    windowSize: any;
    getExcelTemplate?: any;
    optionField: any[];
    dataInvalid: any[];
    dataValid: any[];
    dataValidate: any[];
    dataError: any[];
    headerValidateExcelColumns: any[];
    headerHandleErrorExcelColumns: any[];
}
declare const ImportExcelComponent: (props: IFPropsDetail) => react_jsx_runtime.JSX.Element;

type IFSteps = {
    id: string;
    content: JSX.Element;
    subtitle?: JSX.Element | string;
    title: JSX.Element | string;
    icon?: JSX.Element | string;
    done?: boolean;
    loading?: boolean;
    disable?: boolean;
};
type IFProps = {
    steps: IFSteps[];
    activeStep: number;
    setActiveStep?: (stepper: number) => void;
    className?: string;
    headerClassName?: string;
    contentClassName?: string;
    contentWrapperClassName?: string;
    heightContent?: number | string;
    widthContent?: number | string;
    type?: 'vertical' | 'horizontal' | 'modern-horizontal' | 'modern-vertical';
    separator?: JSX.Element;
};
declare const Wizard: React.ForwardRefExoticComponent<IFProps & React.RefAttributes<unknown>>;

export { ExportExcelComponent, FindNodeByPath, type FromItemsField, type IColumnTable, type ICommandItem, type IFColumnSelectTable, type IFColumnSelectTableTree, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFPropsDetail, type IFTableEditButton, type IFTableEditFormat, type IFTableEditPaging, type IFTableEditSearchSetting, type IFTableEditToolbar, type IFTableSelectFormat, type IFTableTreeSelectFormat, type IFToolbarOptions, type IHeaderColumnTable, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, ImportExcelComponent, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, Wizard, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
