/* eslint-disable*/
const exports = require("react/jsx-dev-runtime")
const { jsxs } = require("../../../node_modules/react/jsx-runtime")
const lib = require("./index").default

const origJsxDev = exports.jsxDEV
const store = lib.store

module.exports = exports

const wrap = fn =>
  function jsxDEV(origType, ...rest) {
    if (store.React && store.React.isWDYR) {
      const type = lib.getWDYRType(origType)
      if (type) {
        try {
          const element = fn(type, ...rest)
          if (store.options.logOwnerReasons) {
            lib.storeOwnerData(element)
          }
          return element
        } catch (e) {
          store.options.console.log(
            "whyDidYouRender JSX transform error. Please file a bug at https://github.com/welldone-software/why-did-you-render/issues.",
            {
              errorInfo: {
                error: e,
                componentNameOrComponent: origType,
                rest,
                options: store.options,
              },
            },
          )
        }
      }
    }

    return fn(origType, ...rest)
  }

exports.jsxDEV = exports.jsx = wrap(origJsxDev)
exports.jsxsDEV = exports.jsxs = wrap(jsxs)
