import * as p from "react";
import i from "../../../rc-util/es/omit.mjs";
import { devUseWarning as a } from "../_util/warning.mjs";
import l from "./Base/index.mjs";
var c = globalThis && globalThis.__rest || function(o, n) {
  var e = {};
  for (var r in o)
    Object.prototype.hasOwnProperty.call(o, r) && n.indexOf(r) < 0 && (e[r] = o[r]);
  if (o != null && typeof Object.getOwnPropertySymbols == "function")
    for (var t = 0, r = Object.getOwnPropertySymbols(o); t < r.length; t++)
      n.indexOf(r[t]) < 0 && Object.prototype.propertyIsEnumerable.call(o, r[t]) && (e[r[t]] = o[r[t]]);
  return e;
};
const f = (o, n) => {
  var {
    ellipsis: e
  } = o, r = c(o, ["ellipsis"]);
  const t = p.useMemo(() => e && typeof e == "object" ? i(e, ["expandable", "rows"]) : e, [e]);
  if (process.env.NODE_ENV !== "production") {
    const s = a("Typography.Text");
    process.env.NODE_ENV !== "production" && s(typeof e != "object" || !e || !("expandable" in e) && !("rows" in e), "usage", "`ellipsis` do not support `expandable` or `rows` props.");
  }
  return /* @__PURE__ */ p.createElement(l, Object.assign({
    ref: n
  }, r, {
    ellipsis: t,
    component: "span"
  }));
}, d = /* @__PURE__ */ p.forwardRef(f);
export {
  d as default
};
