"use strict";

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

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

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

var _react = require("react");

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

function withOnTouch(Form) {
  return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
    return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      onTouchStart: function onTouchStart(e) {
        if (e.target !== document.activeElement && document.activeElement) {
          document.activeElement.blur();
        }
      },
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Form, (0, _objectSpread2["default"])({
        ref: ref
      }, props))
    });
  });
}
//# sourceMappingURL=withOnTouch.cjs.map