import { useState } from 'react';
import { CustomFieldsFormState, } from '../../state';
export function useCustomFieldsFormState(params) {
    const { state: allNamespacesFormState, namespace } = params;
    const translate = allNamespacesFormState._customFieldsWidgetState.container.translate;
    const [state] = useState(() => allNamespacesFormState.addFormIfAbsent(new CustomFieldsFormState({
        customFieldsWidgetState: allNamespacesFormState._customFieldsWidgetState,
        translate,
        namespace,
    })));
    return state;
}
//# sourceMappingURL=useCustomFieldsFormState.js.map