import * as l from "react";
import { devUseWarning as s } from "../_util/warning.mjs";
import i from "./Base/index.mjs";
var p = globalThis && globalThis.__rest || function(t, n) {
  var r = {};
  for (var e in t)
    Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (r[e] = t[e]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
    for (var o = 0, e = Object.getOwnPropertySymbols(t); o < e.length; o++)
      n.indexOf(e[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[o]) && (r[e[o]] = t[e[o]]);
  return r;
};
const c = [1, 2, 3, 4, 5], f = /* @__PURE__ */ l.forwardRef((t, n) => {
  const {
    level: r = 1
  } = t, e = p(t, ["level"]);
  let o;
  if (process.env.NODE_ENV !== "production") {
    const a = s("Typography.Title");
    process.env.NODE_ENV !== "production" && a(c.includes(r), "usage", "Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.");
  }
  return c.includes(r) ? o = `h${r}` : o = "h1", /* @__PURE__ */ l.createElement(i, Object.assign({
    ref: n
  }, e, {
    component: o
  }));
}), d = f;
export {
  d as default
};
