import React, { SVGProps } from "react";
import { HeaderProps } from "react-table";
import { NestedValue, UseFormReturn } from "react-hook-form";
import { UseDisclosureProps } from "@chakra-ui/react";
import { ColumnMenuInstance } from "../component/ColumnMenu/Create";
import { OperationDefinition } from '../engine/interpreter';
import { ColumnDef, CellContext } from "@tanstack/react-table";
import { TableColumn } from "../dml/interfaces";
export type ColumnDefinition<TOptions extends Record<string, any> = Record<string, any>> = {
    options: TOptions;
    type: string;
    id: string;
};
export type FilterOptionType = {
    value: string;
    text: string;
};
export declare const renderInputStyle: {
    height: string;
    borderRadius: string;
    backgroundColor: string;
    paddingY: string;
};
export declare const EditCellStyle: {};
type ColumnBuilder<TOptions extends Record<string, any>> = {
    build(obj: Partial<Omit<ColumnDefinition<TOptions>, "type">>): ColumnDefinition<TOptions>;
    column: ColumnDefinition<TOptions>;
    RenderHeader: React.FC<{
        column: ColumnDefinition<TOptions>;
    }>;
    RenderCell: React.FC<{
        column: ColumnDefinition<TOptions>;
        cell: React.PropsWithChildren<CellContext<Record<string, any>, any>>;
        value: any;
        type?: string;
        onFocus?: () => void;
        style?: Record<string, any>;
    }>;
    EditCell: React.FC<{
        column: ColumnDefinition<TOptions>;
        cell: React.PropsWithChildren<CellContext<Record<string, any>, any>>;
        value: any;
        onBlur: (val?: any) => void;
        onChange: (val: any) => void;
        onKeyDown: React.KeyboardEventHandler<any>;
    }>;
    CreateColumn: React.FC<{
        column: ColumnDefinition<TOptions>;
        formRef: UseFormReturn<{
            column: NestedValue<ColumnDefinition<TOptions>>;
            name: string;
            desc: string;
        }, object>;
        modalDisclosure?: UseDisclosureProps;
    }>;
    UpdateColumn: React.FC<{
        modalDisclosure?: UseDisclosureProps;
        formRef: UseFormReturn<{
            column: NestedValue<ColumnDefinition<TOptions>>;
            name: string;
            desc: string;
        }, object>;
        columnType: string;
        column: Record<string, any>;
    }>;
    CreateOrUpdateModal?: React.FC<{
        modalDisclosure?: UseDisclosureProps;
        formRef: UseFormReturn<{
            column: NestedValue<ColumnDefinition<TOptions>>;
            name: string;
            desc: string;
        }, object>;
        column: Record<string, any>;
    }>;
    SelectOption: {
        value: string;
        text: string;
    }[];
    SelectIcon: (props: SVGProps<SVGSVGElement>) => JSX.Element;
    FilterSelectOption?: FilterOptionType[];
    FilterSelectValues?: React.FC<{
        filterValueChange?: (e: any) => void;
        fieldName?: string;
        defaultValue?: string;
        relationTable?: string;
        relationColumn?: any;
        column?: ColumnDefinition<TOptions>;
        cell?: React.PropsWithChildren<CellContext<Record<string, any>, any>>;
    }>;
    modifyColumn?: {
        buildAlterOperations?: (metadata: {
            table: string;
            desc: string;
            name: string;
            previousName: string;
        }, column: ColumnDefinition<TOptions>) => OperationDefinition[];
        autoFillForm?(formRef: UseFormReturn<{
            column: NestedValue<ColumnDefinition<TOptions>>;
            name: string;
            desc: string;
        }, object>): void;
        getRelationName?(column: TableColumn<ColumnDef<TOptions>>): string;
        getMigrationsViews?(cell?: React.PropsWithChildren<HeaderProps<Record<string, any>>>, schema?: Record<string, any>, table?: Record<string, any>, variant?: "update" | "delete", newTitle?: string, relatedViews?: Record<string, any>): Record<string, any>[];
        customQuery?(data: ColumnMenuInstance, query: Record<string, any>, tableName: string, variant: "create" | "update"): Record<string, any>;
        customErrorMessage?(data?: ColumnMenuInstance): Record<"type" | "error" | "customMessage", any>[];
        detectErrorInput?(column?: ColumnDefinition<TOptions>, name?: string): string | null | undefined;
        customColumnType?: string;
    };
    modifyRow?: {
        mode?: "onBlur" | "onChange";
        isOnlyRenderCell?: boolean;
        isOnlyEditCell?: boolean;
        isUpdateRow?: boolean;
        customErrorMessage?: Record<"type" | "error" | "customMessage", any>[];
    };
};
export default class ColumnRegistry {
    ColumnBuilders: Record<string, ColumnBuilder<any>>;
    from<T extends Record<string, any>>(defaultOptions: T): {
        addColumn: (type: string, createColumnBuilder: () => Omit<ColumnBuilder<T>, "schema" | "column" | "build">) => ColumnBuilder<T>;
    };
}
export {};
