var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/ai-text/index.tsx
var ai_text_exports = {};
__export(ai_text_exports, {
  default: () => ai_text_default
});
module.exports = __toCommonJS(ai_text_exports);
var import_react = __toESM(require("react"));
var import_classnames = __toESM(require("classnames"));
var import_index = require("./index.less");
var AiText = ({ className, style, showIcon, animation, setColorOnHover = false, children, onClick, ...rest }) => {
  const duration = animation && typeof animation === "object" ? animation.duration ?? 2e3 : 2e3;
  return /* @__PURE__ */ import_react.default.createElement(
    "span",
    {
      className: (0, import_classnames.default)("u-ai-text-container", className),
      style: { cursor: onClick ? "pointer" : "default", ...style },
      onClick,
      ...rest
    },
    /* @__PURE__ */ import_react.default.createElement(
      "span",
      {
        className: (0, import_classnames.default)("ai-text", { animate: animation }, { hover: setColorOnHover }),
        style: { animationDuration: duration + "ms" }
      },
      children
    ),
    showIcon && (animation ? /* @__PURE__ */ import_react.default.createElement("img", { src: "https://ehr-cdn.nos-jd.163yun.com/cd696a43f6cbc16a2c0fca29b9fcf1b6", width: 32, alt: "" }) : /* @__PURE__ */ import_react.default.createElement("img", { src: "https://ehr-cdn.nos-jd.163yun.com/669cb03b91ef70b5cdbecb7c938d8d1e", width: 20, alt: "" }))
  );
};
var ai_text_default = AiText;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
