import * as a from "react";
import O from "../../../classnames/index.mjs";
import { devUseWarning as b } from "../_util/warning.mjs";
import "../config-provider/index.mjs";
import v from "./style/index.mjs";
import x from "../config-provider/hooks/useCSSVarCls.mjs";
import h from "./TimelineItem.mjs";
import N from "./TimelineItemList.mjs";
import I from "./useItems.mjs";
import { ConfigContext as T } from "../config-provider/context.mjs";
var j = globalThis && globalThis.__rest || function(t, s) {
  var i = {};
  for (var e in t)
    Object.prototype.hasOwnProperty.call(t, e) && s.indexOf(e) < 0 && (i[e] = t[e]);
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
    for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
      s.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (i[e[r]] = t[e[r]]);
  return i;
};
const n = (t) => {
  const {
    getPrefixCls: s,
    direction: i,
    timeline: e
  } = a.useContext(T), {
    prefixCls: r,
    children: l,
    items: c,
    className: f,
    style: p
  } = t, d = j(t, ["prefixCls", "children", "items", "className", "style"]), o = s("timeline", r);
  process.env.NODE_ENV !== "production" && b("Timeline").deprecated(!l, "Timeline.Item", "items");
  const m = x(o), [u, y, g] = v(o, m), C = I(c, l);
  return u(/* @__PURE__ */ a.createElement(N, Object.assign({}, d, {
    className: O(e == null ? void 0 : e.className, f, g, m),
    style: Object.assign(Object.assign({}, e == null ? void 0 : e.style), p),
    prefixCls: o,
    direction: i,
    items: C,
    hashId: y
  })));
};
n.Item = h;
process.env.NODE_ENV !== "production" && (n.displayName = "Timeline");
const U = n;
export {
  U as default
};
