"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = withSnackbar;

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

var _notistack = require("notistack");

var _react = require("react");

var _jsxRuntime = require("react/jsx-runtime");

function withSnackbar(Form) {
  return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
    var form = /*#__PURE__*/(0, _jsxRuntime.jsx)(Form, (0, _objectSpread2["default"])({
      ref: ref
    }, props));
    return (0, _notistack.useSnackbar)() ? form : /*#__PURE__*/(0, _jsxRuntime.jsx)(_notistack.SnackbarProvider, {
      children: form
    });
  });
}
//# sourceMappingURL=withSnackbar.cjs.map