"use client";
'use strict';

var React = require('react');
var icon = require('@page-speed/icon');
var jsxRuntime = require('react/jsx-runtime');

function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}

var React__namespace = /*#__PURE__*/_interopNamespace(React);

var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
var DynamicIcon = React__namespace.memo(function DynamicIcon2({
  apiKey,
  name,
  ...props
}) {
  if (name == null) return null;
  if (typeof name !== "string") {
    return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: name });
  }
  return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, name, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
});
DynamicIcon.displayName = "DynamicIcon";

exports.DynamicIcon = DynamicIcon;
