import { default as React } from 'react';
import { FormField, TableRpc } from '@kottster/common';
interface RecordModalField {
    /** Display label for the field */
    label?: string;
    /** Column name in the database table */
    column: string;
    /** Form field type */
    formField?: FormField;
    /** Mark the field as required */
    required?: boolean;
    /** Sets how wide the field should be in a 12-column layout (1-12) */
    span?: number;
    /** Position of the field in the form */
    position?: number;
}
export type RecordModalFieldTransformer = (field: RecordModalField) => RecordModalField;
export interface RecordModalProps {
    pageSettingsKey: string;
    defaultTableRpc: TableRpc;
    primaryKeyValue?: number | string;
    /** Title of the modal */
    title?: string;
    /** Width of the modal */
    width?: number;
    fields?: RecordModalField[];
    /**
     * Function to transform all fields.
     * Executes after fields are auto-generated or provided via the fields prop.
     * @param fields - The current array of field definitions
     * @returns A new array of transformed field definitions
     */
    fieldTransformer?: (fields: RecordModalField[]) => RecordModalField[];
    /**
     * Object with field keys as properties and field overrides as values.
     * Use this to override specific properties of individual fields.
     */
    fieldOverrides?: Record<string, RecordModalField | RecordModalFieldTransformer>;
    submitLoading?: boolean;
    mode: 'view' | 'create' | 'update';
    onDelete: () => void;
    onOpenUpdate: () => void;
    onCreate: (data: Record<string, any>) => void;
    onUpdate: (data: Record<string, any>) => void;
    onClose: () => void;
    initialValues?: Record<string, any>;
}
declare function RecordModal({ primaryKeyValue, fields: fieldsProp, fieldTransformer, fieldOverrides, width, pageSettingsKey, defaultTableRpc, mode, onDelete, onOpenUpdate, onCreate, onUpdate, onClose, title: titleProp, submitLoading, initialValues, }: RecordModalProps): React.JSX.Element;
export default RecordModal;
