"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) || 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;
};
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
            t[p[i]] = s[p[i]];
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var styled_components_1 = require("styled-components");
var styled_system_1 = require("styled-system");
var maxWidth = styled_system_1.responsiveStyle('max-width', 'maxWidth');
var Container = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  ", " ", " ", " ", " ", ";\n"], ["\n  ", " ", " ", " ", " ", ";\n"])), styled_system_1.textAlign, maxWidth, styled_system_1.fontSize, styled_system_1.space, styled_system_1.color);
Container.displayName = 'Container';
Container.defaultProps = {
    px: 3,
    ml: 'auto',
    mr: 'auto'
};
exports.default = styled_components_1.withTheme(function (_a) {
    var theme = _a.theme, props = __rest(_a, ["theme"]);
    return (React.createElement(Container, __assign({}, props, { maxWidth: theme.breakpoints.map(function (bp, i) { return bp - theme.space[i] + "em"; }) })));
});
var templateObject_1;
