import { Context } from 'react';
import { TObjectDriller } from './ObjectDriller';
/**
 * FormContext provides form data, data accessor, and data update function to any
 * components that are children of a Form
 *
 * @property data The data being tracked (displayed and updated) by the form.
 * This data should only get immutable updates, via the provided updateData function.
 *
 * @property dataDriller ObjectDriller wrapper on form data, provided for convenience
 * to save all custom form fields from needing to create one.
 *
 * @property updateData Immutable update function for form data
 */
export declare type FormContextType = {
    data: any;
    dataDriller: any;
    updateData: React.Dispatch<React.SetStateAction<any>>;
    hideStatus?: boolean;
};
/**
 * The generic form context type, to support parameterized types for the context
 */
export declare type GenericFormContextType<T> = {
    data: T;
    dataDriller: TObjectDriller<NonNullable<T>>;
    updateData: React.Dispatch<React.SetStateAction<T>>;
    hideStatus?: boolean;
};
/**
 * Utility for casting the un-typed context to the generic with type parameter,
 * so that form consumers can have type-constrained data, dataDriller, and updateData
 * @param context
 */
export declare function useGenericContext<S>(context: Context<any>): GenericFormContextType<S>;
export declare const FormContext: Context<FormContextType>;
export declare const FormProvider: import("react").Provider<FormContextType>, FormConsumer: import("react").Consumer<FormContextType>;
