"use strict";

exports.__esModule = true;
exports.useWidgetForm = void 0;
var _react = require("react");
var _react2 = require("@wix/bex-core/react");
const useWidgetForm = () => {
  const formPageState = (0, _react.useContext)(_react2.formPageContext);
  const widgetsFormState = (0, _react.useContext)(_react2.widgetsFormContext);
  const [state] = (0, _react.useState)(() => formPageState ?? widgetsFormState);
  return state;
};
exports.useWidgetForm = useWidgetForm;
//# sourceMappingURL=useWidgetForm.js.map