"use strict";

exports.__esModule = true;
exports.useCustomFieldsFormState = useCustomFieldsFormState;
var _react = require("react");
var _state = require("../../state");
function useCustomFieldsFormState(params) {
  const {
    state: allNamespacesFormState,
    namespace
  } = params;
  const translate = allNamespacesFormState._customFieldsWidgetState.container.translate;
  const [state] = (0, _react.useState)(() => allNamespacesFormState.addFormIfAbsent(new _state.CustomFieldsFormState({
    customFieldsWidgetState: allNamespacesFormState._customFieldsWidgetState,
    translate,
    namespace
  })));
  return state;
}
//# sourceMappingURL=useCustomFieldsFormState.js.map