"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);
};
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 recompose_1 = require("recompose");
var styled_components_1 = require("styled-components");
var asRendition_1 = require("../asRendition");
var utils_1 = require("../utils");
var Txt_1 = require("./Txt");
var BasePill = utils_1.withProps()(styled_components_1.default(Txt_1.default))(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tpadding: 2px 8px;\n\tborder-radius: 10px;\n\tfont-family: ", ";\n\tfont-size: 12px;\n\tfont-weight: 500;\n\tfont-style: normal;\n\tfont-stretch: normal;\n\tline-height: 14px;\n\tletter-spacing: 0.5px;\n\tcolor: #fff;\n\tbackground-color: ", ";\n"], ["\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tpadding: 2px 8px;\n\tborder-radius: 10px;\n\tfont-family: ", ";\n\tfont-size: 12px;\n\tfont-weight: 500;\n\tfont-style: normal;\n\tfont-stretch: normal;\n\tline-height: 14px;\n\tletter-spacing: 0.5px;\n\tcolor: #fff;\n\tbackground-color: ",
    ";\n"])), function (props) { return props.theme.font; }, function (props) {
    return utils_1.getColor(props, 'bg', props.shade || 'main') || props.bg || '#7e8085';
});
var SmallPill = BasePill.extend(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n\tpadding: 1.4px 5.6px;\n\tfont-size: 8.4px;\n\tline-height: 11px;\n"], ["\n\tpadding: 1.4px 5.6px;\n\tfont-size: 8.4px;\n\tline-height: 11px;\n"])));
var Pill = function (_a) {
    var small = _a.small, children = _a.children, props = __rest(_a, ["small", "children"]);
    var PillComponent = !small ? BasePill : SmallPill;
    return React.createElement(PillComponent, __assign({}, props), children);
};
exports.default = recompose_1.compose(styled_components_1.withTheme, asRendition_1.default)(Pill);
var templateObject_1, templateObject_2;
