'use strict';

var react = require('@osdk/react');
var React = require('react');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefault(React);

// src/util/withOsdkMetrics.ts

// src/util/UserAgent.ts
var PACKAGE_USER_AGENT = `osdk-react-components/${"0.41.0"}`;
function componentUserAgent(componentName) {
  return `${PACKAGE_USER_AGENT}/${componentName}`;
}

// src/util/withOsdkMetrics.ts
function withOsdkMetrics(Component, name) {
  const Wrapped = (props) => {
    react.useRegisterUserAgent(componentUserAgent(name));
    return /* @__PURE__ */ React__default.default.createElement(Component, props);
  };
  Wrapped.displayName = `withOsdkMetrics(${name})`;
  return Wrapped;
}

exports.withOsdkMetrics = withOsdkMetrics;
//# sourceMappingURL=chunk-OWBDRWL6.cjs.map
//# sourceMappingURL=chunk-OWBDRWL6.cjs.map