text: var __create = Object.create;
  var __defProp = Object.defineProperty;
  var __getProtoOf = Object.getPrototypeOf;
  var __hasOwnProp = Object.prototype.hasOwnProperty;
  var __getOwnPropNames = Object.getOwnPropertyNames;
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {enumerable: true, configurable: true, writable: true, value}) : obj[key] = value;
  var __objSpread = (a, b) => {
    for (var prop in b || (b = {}))
      if (__hasOwnProp.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    if (__getOwnPropSymbols)
      for (var prop of __getOwnPropSymbols(b)) {
        if (__propIsEnum.call(b, prop))
          __defNormalProp(a, prop, b[prop]);
      }
    return a;
  };
  var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
  var __objRest = (source, exclude) => {
    var target = {};
    for (var prop in source)
      if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
        target[prop] = source[prop];
    if (source != null && __getOwnPropSymbols)
      for (var prop of __getOwnPropSymbols(source)) {
        if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
          target[prop] = source[prop];
      }
    return target;
  };
  var __export = (target, all) => {
    for (var name in all)
      __defProp(target, name, {get: all[name], enumerable: true});
  };
  var __reExport = (target, module2, desc) => {
    if (module2 && typeof module2 === "object" || typeof module2 === "function") {
      for (let key of __getOwnPropNames(module2))
        if (!__hasOwnProp.call(target, key) && key !== "default")
          __defProp(target, key, {get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable});
    }
    return target;
  };
  var __toModule = (module2) => {
    return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
  };
  __markAsModule(exports);
  __export(exports, {
    Code: () => Code
  });
  var import_react = __toModule(require("react"));
  var import_react_refractor = __toModule(require("react-refractor"));
  var import_styled_components = __toModule(require("styled-components"));
  var import_internal = __toModule(require("../../styles/internal"));
  var import_styles = __toModule(require("./styles"));
  const Root = import_styled_components.default.pre(import_styles.codeBaseStyle, import_internal.responsiveCodeFontStyle);
  const Code = (0, import_react.forwardRef)((props, ref) => {
    const _a = props, {children, language: languageProp, size = 2, weight} = _a, restProps = __objRest(_a, ["children", "language", "size", "weight"]);
    const language = typeof languageProp === "string" ? languageProp : void 0;
    const registered = language ? import_react_refractor.default.hasLanguage(language) : false;
    return /* @__PURE__ */ import_react.default.createElement(Root, __objSpread(__objSpread({
      "data-ui": "Code"
    }, restProps), {
      $size: size,
      $weight: weight,
      ref
    }), !(language && registered) && /* @__PURE__ */ import_react.default.createElement("code", null, children), language && registered && /* @__PURE__ */ import_react.default.createElement(import_react_refractor.default, {
      inline: true,
      language,
      value: String(children)
    }));
  });
  Code.displayName = "Code";
  