"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 React = require("react");
var styled_components_1 = require("styled-components");
var styled_system_1 = require("styled-system");
var asRendition_1 = require("../asRendition");
var utils_1 = require("../utils");
exports.whitespace = function (props) {
    return props.whitespace ? { whiteSpace: props.whitespace } : null;
};
exports.caps = function (props) {
    return props.caps ? { textTransform: 'uppercase', letterSpacing: '0.2em' } : null;
};
exports.bold = function (props) {
    return props.bold
        ? { fontWeight: props.theme.weights[props.theme.weights.length - 1] }
        : null;
};
exports.align = styled_system_1.style({
    key: 'text-align',
    prop: 'align',
    cssProperty: 'text-align',
});
var Txt = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\t", "\n\t", "\n\t", "\n\n\t", "\n\t", "\n"], ["\n\t", "\n\t", "\n\t", "\n\n\t", "\n\t", "\n"])), exports.align, utils_1.monospace, exports.whitespace, exports.caps, exports.bold);
var Factory = function (tag) {
    return asRendition_1.default(function (props) {
        return React.createElement(Txt, __assign({ as: tag }, props));
    });
};
var Base = Factory();
Base.displayName = 'Txt';
Base.span = Factory('span');
Base.p = Factory('p');
exports.default = Base;
var templateObject_1;
