import type { FieldAccessor, FieldValue } from '@contember/binding';
import type { AllControlProps, ControlProps } from '@contember/ui';
import { Ref } from 'react';
import type { SimpleRelativeSingleFieldMetadata } from '../auxiliary';
export declare type ControlValueParser<ControlVal, FieldVal extends FieldValue> = (value: ControlVal | null | undefined, field: FieldAccessor<FieldVal>) => FieldVal | null;
export declare type FieldValueFormatter<FieldVal extends FieldValue, ControlVal extends FieldValue> = (value: FieldVal | null | undefined, field: FieldAccessor<FieldVal>) => ControlVal | null;
export declare type UseControlProps<FieldVal extends FieldValue, ControlVal extends FieldValue> = ControlProps<FieldVal> & {
    fieldMetadata: SimpleRelativeSingleFieldMetadata<FieldVal>;
    parse: ControlValueParser<ControlVal, FieldVal>;
    format: FieldValueFormatter<FieldVal, ControlVal>;
};
export declare const useFieldControl: <FieldVal extends FieldValue, ControlVal extends FieldValue, Type extends string | undefined = string | undefined>({ fieldMetadata, parse, format, ...props }: UseControlProps<FieldVal, ControlVal>) => AllControlProps<ControlVal> & {
    ref: Ref<any>;
};
//# sourceMappingURL=useFieldControl.d.ts.map