import { CSSProperties, MutableRefObject, PropsWithChildren } from "react";
import { T_d_input_possible_all } from "../input";
import { DInputProps, T_DInputProps_enum_type } from "../..";
interface omit_dGrid_input 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;
}
export interface DGridProps_columns<T extends Record<string, T_d_input_possible_all>> extends omit_dGrid_input {
    name?: keyof T;
    onClick?: (rowData: T, isSelected: boolean) => void;
    bodyRowStyle?: ((rowData?: T, isSelected?: boolean) => CSSProperties) | CSSProperties;
    type?: T_DInputProps_enum_type | ((data?: T, index?: number, isSelected?: boolean) => React.ReactNode);
    maxDateKeyName?: string;
    minDateKeyName?: string;
}
export interface DGridProps_options {
    /**
     * @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 DGridRefProps<T = Record<string, T_d_input_possible_all>> = {
    /** @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 _ExcelCellStyle_BORDER = "dashDotDot" | "dashDot" | "dashed" | "dotted" | "hair" | "mediumDashDotDot" | "mediumDashDot" | "mediumDashed" | "medium" | "slantDashDot" | "thick" | "thin";
type _ExcelCellStyle_COLOR = {
    rgb?: string;
    theme?: number;
    tint?: number;
};
type _ExcelCellStyle = {
    alignment?: {
        vertical?: "top" | "center" | "bottom";
        horizontal?: "left" | "center" | "right";
        wrapText?: boolean;
        textRotation?: number;
    };
    border?: {
        top?: {
            style?: _ExcelCellStyle_BORDER;
            color?: _ExcelCellStyle_COLOR;
        };
        bottom?: {
            style?: _ExcelCellStyle_BORDER;
            color?: _ExcelCellStyle_COLOR;
        };
        left?: {
            style?: _ExcelCellStyle_BORDER;
            color?: _ExcelCellStyle_COLOR;
        };
        right?: {
            style?: _ExcelCellStyle_BORDER;
            color?: _ExcelCellStyle_COLOR;
        };
        diagonal?: {
            style?: _ExcelCellStyle_BORDER;
            color?: _ExcelCellStyle_COLOR;
            diagonalUp?: boolean;
            diagonalDown?: boolean;
        };
    };
    fill?: {
        patternType?: "solid" | "none";
        fgColor?: _ExcelCellStyle_COLOR;
        bgColor?: _ExcelCellStyle_COLOR;
    };
    font?: {
        bold?: boolean;
        color?: _ExcelCellStyle_COLOR;
        italic?: boolean;
        name?: string;
        strike?: boolean;
        sz?: number;
        underline?: boolean;
        vertAlign?: "superscript" | "subscript";
    };
    numFmt?: string;
};
export interface DGridProps<T extends Record<string, T_d_input_possible_all>> extends PropsWithChildren {
    dataRows: T[];
    dependencies?: unknown[];
    setDataRows: React.Dispatch<React.SetStateAction<T[]>>;
    options?: DGridProps_options;
    columns?: DGridProps_columns<T>[] | DGridProps_columns<T>[][];
    height?: number | string;
    className?: string;
    tableFill?: boolean;
    rowSelectMode?: "single" | "multiple" | "event" | "unused" | undefined;
    striped?: boolean;
    rowSelectType?: "row" | "checkbox";
    tableRef?: MutableRefObject<DGridRefProps<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?: (DGridProps_columns<T> & {
            bodyExcelCellStyle?: _ExcelCellStyle;
            headerExcelCellStyle?: _ExcelCellStyle;
        })[];
        align?: "start" | "center" | "end";
        fileName?: string;
        colMinLetter?: number;
        headerCellStyle?: _ExcelCellStyle;
        bodyCellStyle?: _ExcelCellStyle;
    };
}
export type T_controller_record_object = {
    __selected?: boolean;
    __realIndex?: number;
};
/**
 * todo type render always render problem..
 */
export declare const DGrid: <T extends Record<string, any>>({ columns, options, dependencies, className, dataRows, setDataRows, height, tableFill, rowSelectMode, striped, rowSelectType, tableRef, onRowsSelect, onCurrentSelect, onCurrentUnSelect, excelExport, bodyRowStyle, variant, }: DGridProps<T>) => import("react").JSX.Element;
export default DGrid;
