import _extends from 'babel-runtime/helpers/extends';
import _defineProperty from 'babel-runtime/helpers/defineProperty';
var _jsxFileName = 'src/grid/Col.jsx';
/**
 * 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 === undefined ? {} : _props$colStyle,
        _props$style = props.style,
        style = _props$style === undefined ? {} : _props$style;


    var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, prefixCls + '-' + size, size), _defineProperty(_classNames, prefixCls + '-offset-' + offset, offset), _defineProperty(_classNames, prefixCls + '-order-' + order, order), _defineProperty(_classNames, prefixCls + '-align-' + align, align), _classNames), className);

    return React.createElement(
        'div',
        { className: classes, style: _extends({}, colStyle, style), __source: {
                fileName: _jsxFileName,
                lineNumber: 30
            },
            __self: this
        },
        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';