import * as tslib_1 from "tslib";
import * as React from 'react';
import classNames from 'classnames';
var defaultProps = {
    prefixCls: 'ty-col',
    span: 24,
    offset: 0,
    order: 0,
};
var ScreenType = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
var Col = function (props) {
    var _a;
    var span = props.span, offset = props.offset, order = props.order, prefixCls = props.prefixCls, className = props.className, style = props.style, children = props.children;
    var sizeClassObj = {};
    ScreenType.forEach(function (size) {
        var _a;
        var sizeProps = {};
        if (typeof props[size] === 'number') {
            sizeProps.span = props[size];
        }
        else if (typeof props[size] === 'object') {
            sizeProps = props[size] || {};
        }
        sizeClassObj = tslib_1.__assign({}, sizeClassObj, (_a = {}, _a[prefixCls + "-" + size + "-" + sizeProps.span] = sizeProps.span !== undefined, _a[prefixCls + "-" + size + "-order-" + sizeProps.order] = sizeProps.order || sizeProps.order === 0, _a[prefixCls + "-" + size + "-offset-" + sizeProps.offset] = sizeProps.offset || sizeProps.offset === 0, _a));
    });
    var cls = classNames(prefixCls, className, (_a = {},
        _a[prefixCls + "-" + span] = span,
        _a[prefixCls + "-offset-" + offset] = offset,
        _a[prefixCls + "-order-" + order] = order,
        _a), sizeClassObj);
    return (React.createElement("div", { className: cls, style: style }, children));
};
Col.defaultProps = defaultProps;
export default Col;
//# sourceMappingURL=index.js.map