import { __assign, __extends, __rest } from "tslib";
import classnames from 'classnames';
import * as React from 'react';
var Flex = /** @class */ (function (_super) {
    __extends(Flex, _super);
    function Flex() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Flex.prototype.render = function () {
        var _a;
        var _b = this.props, direction = _b.direction, wrap = _b.wrap, justify = _b.justify, align = _b.align, alignContent = _b.alignContent, className = _b.className, children = _b.children, prefixCls = _b.prefixCls, style = _b.style, restProps = __rest(_b, ["direction", "wrap", "justify", "align", "alignContent", "className", "children", "prefixCls", "style"]);
        var wrapCls = classnames("lp-flexbox", className, (_a = {},
            _a[prefixCls + "dir-row"] = direction === 'row',
            _a[prefixCls + "dir-row-reverse"] = direction === 'row-reverse',
            _a[prefixCls + "dir-column"] = direction === 'column',
            _a[prefixCls + "dir-column-reverse"] = direction === 'column-reverse',
            _a[prefixCls + "nowrap"] = wrap === 'nowrap',
            _a[prefixCls + "wrap"] = wrap === 'wrap',
            _a[prefixCls + "wrap-reverse"] = wrap === 'wrap-reverse',
            _a[prefixCls + "justify-start"] = justify === 'start',
            _a[prefixCls + "justify-end"] = justify === 'end',
            _a[prefixCls + "justify-center"] = justify === 'center',
            _a[prefixCls + "justify-between"] = justify === 'between',
            _a[prefixCls + "justify-around"] = justify === 'around',
            _a[prefixCls + "align-start"] = align === 'start',
            _a[prefixCls + "align-center"] = align === 'center',
            _a[prefixCls + "align-end"] = align === 'end',
            _a[prefixCls + "align-baseline"] = align === 'baseline',
            _a[prefixCls + "align-stretch"] = align === 'stretch',
            _a[prefixCls + "align-content-start"] = alignContent === 'start',
            _a[prefixCls + "align-content-end"] = alignContent === 'end',
            _a[prefixCls + "align-content-center"] = alignContent === 'center',
            _a[prefixCls + "align-content-between"] = alignContent === 'between',
            _a[prefixCls + "align-content-around"] = alignContent === 'around',
            _a[prefixCls + "align-content-stretch"] = alignContent === 'stretch',
            _a));
        return (React.createElement("div", __assign({ className: wrapCls, style: style }, restProps), children));
    };
    Flex.defaultProps = {
        prefixCls: 'next-',
        align: 'center',
    };
    return Flex;
}(React.Component));
export default Flex;
