import { InputBaseComponentProps } from '@material-ui/core';
import React, { ElementType, ComponentType } from 'react';
import { FieldProps as FinalFieldProps, FieldRenderProps } from 'react-final-form';
export interface MuiFieldComponentProps {
    error?: boolean;
    helperText?: React.ReactNode;
    inputProps?: InputBaseComponentProps;
    onChange: React.ChangeEventHandler;
    ComponentProps?: any;
}
/**
 * Props for Fluent-style components (error string contains the message)
 */
export interface FluentFieldComponentProps {
    error?: string;
    hint?: string;
    onChange?: (event: {
        target: {
            value: unknown;
        };
    }) => void;
}
export type MuiFieldComponent = ElementType<MuiFieldComponentProps>;
export type FieldProps<FieldValue, RP extends FieldRenderProps<FieldValue, T>, T extends HTMLElement = HTMLElement> = {
    component: MuiFieldComponent;
    // @fixme Some of the onChange handlers pass value instead
    valueForChange?: (event: React.ChangeEvent<T>) => FieldValue;
    pattern?: string;
    /**
     * Helper text shown below the input when there's no error.
     * Passed as helperText for MUI components, or automatically converted for Fluent components.
     */
    helperText?: React.ReactNode;
} & Pick<FinalFieldProps<FieldValue, RP, T>, 'afterSubmit' | 'allowNull' | 'beforeSubmit' | 'defaultValue' | 'format' | 'formatOnBlur' | 'initialValue' | 'isEqual' | 'name' | 'parse' | 'subscription' | 'type' | 'validate' | 'validateFields' | 'value' | 'required'> & Omit<MuiFieldComponentProps, 'error' | 'helperText'>;
type FieldComponent<FieldValue = any, RP extends FieldRenderProps<FieldValue, T> = FieldRenderProps<FieldValue, HTMLElement>, T extends HTMLElement = HTMLElement> = ComponentType<FieldProps<FieldValue, RP, T>>;
/**
 * Final Form Field wrapper that supports both Material UI and Fluent UI components.
 *
 * UDP Fluent components automatically detect and convert error props,
 * so you can use the same Field component for both MUI and Fluent components.
 *
 * @example
 * // MUI component
 * <Field component={TextField} name="email" required />
 *
 * @example
 * // UDP Fluent component (auto-detects error style)
 * <Field component={UdpTextInput} name="email" required />
 */
export declare const Field: FieldComponent;
export {};
//# sourceMappingURL=Field.d.ts.map