import * as e from "react";
import { SpaceContext as c } from "./context.mjs";
const o = (s) => {
  let {
    className: l,
    index: a,
    children: t,
    split: n,
    style: r
  } = s;
  const {
    latestIndex: m
  } = e.useContext(c);
  return t == null ? null : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
    className: l,
    style: r
  }, t), a < m && n && /* @__PURE__ */ e.createElement("span", {
    className: `${l}-split`
  }, n));
}, u = o;
export {
  u as default
};
