import { FieldState } from 'final-form';
declare type FormGroupState = {
dirty: boolean;
errors: object;
invalid: boolean;
pristine: boolean;
touched: boolean;
valid: boolean;
};
/**
* Retrieve a specific form group data such as its validation status (valid/invalid) or
* or whether its inputs have been updated (dirty/pristine)
*
* @example
* import { Edit, SimpleForm, TextInput, FormGroupContextProvider, useFormGroup } from '../app';
* import { Accordion, AccordionDetails, AccordionSummary, Typography } from '@mui/material';
*
* const PostEdit = (props) => (
*
*
*
*
*
* }
* aria-controls="options-content"
* id="options-header"
* >
* Options
*
*
*
*
*
*
*
*
* );
*
* const AccordionSectionTitle = ({ children, name }) => {
* const formGroupState = useFormGroup(name);
* return (
*
* {children}
*
* );
* }
*
* @param {string} name The form group name
* @returns {FormGroupState} The form group state
*/
export declare const useFormGroup: (name: string) => FormGroupState;
/**
* Get the state of a form group
*
* @param {FieldState[]} fieldStates A map of field states from final-form where the key is the field name.
* @returns {FormGroupState} The state of the group.
*/
export declare const getFormGroupState: (fieldStates: FieldState[]) => FormGroupState;
export {};