import React, { useContext } from "react";
import classnames from "classnames";
import { BORDER_TOP_BOTTOM } from "../utils/constant";
import ConfigProviderContext from "../config-provider/ConfigProviderContext";
const CellGroup = (props) => {
  const {
    title,
    border,
    inset
  } = props;
  const {
    prefixCls,
    createNamespace
  } = useContext(ConfigProviderContext);
  const [bem] = createNamespace("cell-group", prefixCls);
  const renderGroup = () => /* @__PURE__ */ React.createElement("div", {
    className: classnames(bem({
      inset
    }), {
      [BORDER_TOP_BOTTOM]: !inset && border
    })
  }, props.children);
  const renderTitle = () => /* @__PURE__ */ React.createElement("div", {
    className: classnames(bem("title"))
  }, title);
  if (title)
    return /* @__PURE__ */ React.createElement(React.Fragment, null, renderTitle(), renderGroup());
  return renderGroup();
};
CellGroup.defaultProps = {
  border: true
};
var stdin_default = CellGroup;
export {
  stdin_default as default
};
