import _objectSpread from "@babel/runtime/helpers/objectSpread2";
import { SnackbarProvider, useSnackbar } from 'notistack';
import { forwardRef } from 'react';
import { jsx as _jsx } from "react/jsx-runtime";
export default function withSnackbar(Form) {
  return /*#__PURE__*/forwardRef(function (props, ref) {
    var form = /*#__PURE__*/_jsx(Form, _objectSpread({
      ref: ref
    }, props));

    return useSnackbar() ? form : /*#__PURE__*/_jsx(SnackbarProvider, {
      children: form
    });
  });
}
//# sourceMappingURL=withSnackbar.js.map