import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

/**
 * col.jsx
 *
 * @Author: jruif
 * @Date: 2017/7/4 下午8:59
 */
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
/**
 * Col
 * */

export default function Col(props) {
  var _classNames;

  var prefixCls = props.prefixCls,
      size = props.size,
      offset = props.offset,
      order = props.order,
      align = props.align,
      children = props.children,
      className = props.className,
      _props$colStyle = props.colStyle,
      colStyle = _props$colStyle === void 0 ? {} : _props$colStyle,
      _props$style = props.style,
      style = _props$style === void 0 ? {} : _props$style;
  var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), size), _defineProperty(_classNames, "".concat(prefixCls, "-offset-").concat(offset), offset), _defineProperty(_classNames, "".concat(prefixCls, "-order-").concat(order), order), _defineProperty(_classNames, "".concat(prefixCls, "-align-").concat(align), align), _classNames), className);
  return /*#__PURE__*/React.createElement("div", {
    className: classes,
    style: _objectSpread(_objectSpread({}, colStyle), style)
  }, children);
}
Col.propTypes = {
  /** 栅格左侧的间隔格数，间隔内不可以有栅格 */
  offset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),

  /** 栅格的占位格数，可选值为0~24的整数，为 0 时，相当于display:none */
  size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),

  /** 栅格的顺序 */
  order: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),

  /** 垂直对齐 */
  align: PropTypes.oneOf(['top', 'bottom', 'middle', 'stretch']),

  /** @ignore */
  colStyle: PropTypes.object,

  /** 样式 */
  style: PropTypes.object,

  /** 样式 */
  className: PropTypes.string
};
Col.defaultProps = {
  prefixCls: 'column'
};
Col.displayName = 'NeatUI.Col';