import React, { useContext } from 'react';
import classNames from 'classnames';
import ConfigProvider from '../config-provider';
import RouteContext from '../wau-route-context';
import './style';
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * This component can support contentWidth so you don't need to calculate the width
 * contentWidth=Fixed, width will is 1200
 *
 * @param props
 */
const GridContent = props => {
  const value = useContext(RouteContext);
  const {
    children,
    contentWidth: propsContentWidth,
    className: propsClassName,
    style
  } = props;
  const {
    getPrefixCls
  } = useContext(ConfigProvider.ConfigContext);
  const prefixCls = props.prefixCls || getPrefixCls('pro');
  const contentWidth = propsContentWidth || value.contentWidth;
  const className = `${prefixCls}-grid-content`;
  return /*#__PURE__*/_jsx("div", {
    className: classNames(className, propsClassName, {
      wide: contentWidth === 'Fixed'
    }),
    style: style,
    children: /*#__PURE__*/_jsx("div", {
      className: `${prefixCls}-grid-content-children`,
      children: children
    })
  });
};
export default GridContent;