import React, { useContext } from 'react';
import classnames from 'classnames';
import ConfigProvider from '../config-provider';
import './style';

/**
 * 默认的 index 列容器，提供一个好看的 index
 *
 * @param param0
 */
import { jsx as _jsx } from "react/jsx-runtime";
const IndexColumn = ({
  border = false,
  children
}, ref) => {
  const {
    getPrefixCls
  } = useContext(ConfigProvider.ConfigContext);
  const className = getPrefixCls('pro-field-index-column');
  return /*#__PURE__*/_jsx("div", {
    ref: ref,
    className: classnames(className, {
      [`${className}-border`]: border,
      'top-three': children > 3
    }),
    children: children
  });
};
export default /*#__PURE__*/React.forwardRef(IndexColumn);