"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var assign = require("lodash/assign");
var React = require("react");
var recompose_1 = require("recompose");
var styled_components_1 = require("styled-components");
var styled_system_1 = require("styled-system");
var asRendition_1 = require("../asRendition");
var ContainerBase = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n\t", "\n"], ["\n\t", "\n\t", "\n"])), styled_system_1.textAlign, styled_system_1.maxWidth);
var Container = function (props) {
    return (React.createElement(ContainerBase, __assign({}, props, { maxWidth: props.theme.breakpoints.map(function (bp, i) { return "calc(" + bp + " - " + props.theme.space[i] + "em)"; }) })));
};
Container.displayName = 'Container';
Container.defaultProps = {};
var setDefaultProps = recompose_1.withProps(function (props) {
    return assign({
        px: 3,
        ml: 'auto',
        mr: 'auto',
    }, props);
});
exports.default = asRendition_1.default(Container, [
    setDefaultProps,
]);
var templateObject_1;
