import { CSSProperties, MutableRefObject, PropsWithChildren } from "react";
import { DInputAllType } from "../input";
import { DInputProps, DInputPropsOfTypeDefinedType } from "../..";
interface DGridPropsOfColumnUsingOmitInterface extends Omit<DInputProps, "name" | "className" | "wrapperClassName" | "labelColumnLetter" | "size" | "labelType" | "labelVaraint" | "showLabel" | "variant" | "border" | "borderVariant" | "value" | "onChange" | "onValueChange" | "type" | "isLazy" | "lazyMs"> {
    colSpan?: number;
    rowSpan?: number;
    verticalAlign?: "top" | "middle" | "bottom";
    textAlign?: "start" | "center" | "end";
    bodyTextAlign?: "start" | "center" | "end";
    labelColumnLetter?: number | "auto";
    editable?: boolean;
    sortable?: boolean;
    moveable?: boolean;
}
type KeyOfType<T, U> = {
    [K in keyof T]: NonNullable<T[K]> extends U ? (Exclude<T[K], null | undefined> extends U ? K : never) : never;
}[keyof T];
export interface DGridPropsOfColumnInterface<T extends Record<string, DInputAllType> = Record<string, DInputAllType>> extends DGridPropsOfColumnUsingOmitInterface {
    name?: keyof T;
    onClick?: (rowData: T, isSelected: boolean) => void;
    bodyRowStyle?: ((rowData?: T, isSelected?: boolean) => CSSProperties) | CSSProperties;
    type?: DInputPropsOfTypeDefinedType | ((data?: T, index?: number, isSelected?: boolean) => React.ReactNode);
    maxDateKeyName?: KeyOfType<T, Date | string>;
    minDateKeyName?: KeyOfType<T, Date | string>;
}
export interface DGridPropsOfOptionsInterface {
    /**
     * @description 그리드 헤더의 수직 텍스트 기본 위치
     * @member
     * - top : 윗부분
     * - middle : 가운데
     * - bottom : 바닥 부분
     */
    headerVerticalAlign?: "top" | "middle" | "bottom";
    /**
     * @description 그리드 헤더의 수평 텍스트 기본 위치
     * @member
     * - start : 왼쪽 끝
     * - center : 가운데
     * - end : 오른쪽 끝
     */
    headerTextAlign?: "start" | "center" | "end";
    bodyVerticalAlign?: "top" | "middle" | "bottom";
    bodyTextAlign?: "start" | "center" | "end";
    dataEmptyMessage?: string;
    /**
     * @description 그리드의 row - cell의 기본 너비 길이 ( rem unit )
     */
    labelColumnLetter?: number;
    editable?: boolean;
    sortable?: boolean;
    moveable?: boolean;
    fixColumnIndex?: number;
    isLazy?: boolean;
    lazyMs?: number;
    onKeyEnter?: () => void;
}
export type DGridPropsOfRefType<T = Record<string, DInputAllType>> = {
    /** @description 그리드의 선택행을 전부다 clear 한다.  */
    clearSelect: () => void;
    allSelect: () => void;
    /** @description 그리드의 선택행을 가져온다.  */
    getSelectRows: () => T[] | undefined | null;
    convertToExcel: () => void;
    addSelectRows: (indexes: number[]) => void;
    addSelectRow: (index: number) => void;
    removeSelectRows: (indexes: number[]) => void;
    removeSelectRow: (index: number) => void;
};
type ExcelCellStyleBorderType = "dashDotDot" | "dashDot" | "dashed" | "dotted" | "hair" | "mediumDashDotDot" | "mediumDashDot" | "mediumDashed" | "medium" | "slantDashDot" | "thick" | "thin";
type ExcelCellStyleColorType = {
    rgb?: string;
    theme?: number;
    tint?: number;
};
type ExcelCellStyleType = {
    alignment?: {
        vertical?: "top" | "center" | "bottom";
        horizontal?: "left" | "center" | "right";
        wrapText?: boolean;
        textRotation?: number;
    };
    border?: {
        top?: {
            style?: ExcelCellStyleBorderType;
            color?: ExcelCellStyleColorType;
        };
        bottom?: {
            style?: ExcelCellStyleBorderType;
            color?: ExcelCellStyleColorType;
        };
        left?: {
            style?: ExcelCellStyleBorderType;
            color?: ExcelCellStyleColorType;
        };
        right?: {
            style?: ExcelCellStyleBorderType;
            color?: ExcelCellStyleColorType;
        };
        diagonal?: {
            style?: ExcelCellStyleBorderType;
            color?: ExcelCellStyleColorType;
            diagonalUp?: boolean;
            diagonalDown?: boolean;
        };
    };
    fill?: {
        patternType?: "solid" | "none";
        fgColor?: ExcelCellStyleColorType;
        bgColor?: ExcelCellStyleColorType;
    };
    font?: {
        bold?: boolean;
        color?: ExcelCellStyleColorType;
        italic?: boolean;
        name?: string;
        strike?: boolean;
        sz?: number;
        underline?: boolean;
        vertAlign?: "superscript" | "subscript";
    };
    numFmt?: string;
};
export interface DGridPropsInterface<T extends Record<string, DInputAllType> = Record<string, DInputAllType>> extends PropsWithChildren {
    dataRows: T[];
    dependencies?: unknown[];
    setDataRows: React.Dispatch<React.SetStateAction<T[]>>;
    options?: DGridPropsOfOptionsInterface;
    columns?: DGridPropsOfColumnInterface<T>[] | DGridPropsOfColumnInterface<T>[][];
    height?: number | string;
    className?: string;
    tableFill?: boolean;
    rowSelectMode?: "single" | "multiple" | "event" | "unused" | undefined;
    striped?: boolean;
    rowSelectType?: "row" | "checkbox";
    tableRef?: MutableRefObject<DGridPropsOfRefType<T> | undefined>;
    onRowsSelect?: (selectedArray?: T[], selectedIndexes?: number[]) => void;
    onCurrentSelect?: (selectedData?: T, selectedIndex?: number) => void;
    onCurrentUnSelect?: (selectedData?: T, selectedIndex?: number) => void;
    variant?: string;
    bodyRowStyle?: ((rowData?: T, isSelected?: boolean) => CSSProperties) | CSSProperties;
    excelExport?: {
        display?: boolean;
        excelHeaderText?: string;
        buttonText?: string;
        buttonVariant?: string;
        columns?: (DGridPropsOfColumnInterface<T> & {
            bodyExcelCellStyle?: ExcelCellStyleType;
            headerExcelCellStyle?: ExcelCellStyleType;
        })[];
        align?: "start" | "center" | "end";
        fileName?: string;
        colMinLetter?: number;
        headerCellStyle?: ExcelCellStyleType;
        bodyCellStyle?: ExcelCellStyleType;
    };
}
export type GridControllerRecordListType = {
    __selected?: boolean;
    __realIndex?: number;
};
/**
 * todo type render always render problem..
 */
export declare const DGrid: <T extends Record<string, unknown> = Record<string, unknown>>({ columns, options, dependencies, className, dataRows, setDataRows, height, tableFill, rowSelectMode, striped, rowSelectType, tableRef, onRowsSelect, onCurrentSelect, onCurrentUnSelect, excelExport, bodyRowStyle, variant, }: DGridPropsInterface<T>) => import("react").JSX.Element;
export default DGrid;
