"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "CardPrice", {
    enumerable: true,
    get: function() {
        return CardPrice;
    }
});
var _react = /*#__PURE__*/ _interop_require_default(require("react"));
var _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
var _tokens = require("../../tokens");
var _Price = require("../Price");
var _Typography = require("../Typography");
function _interop_require_default(obj) {
    return obj && obj.__esModule ? obj : {
        default: obj
    };
}
function _object_without_properties(source, excluded) {
    if (source == null) return {};
    var target = {}, sourceKeys, key, i;
    if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
        sourceKeys = Reflect.ownKeys(source);
        for(i = 0; i < sourceKeys.length; i++){
            key = sourceKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
        return target;
    }
    target = _object_without_properties_loose(source, excluded);
    if (Object.getOwnPropertySymbols) {
        sourceKeys = Object.getOwnPropertySymbols(source);
        for(i = 0; i < sourceKeys.length; i++){
            key = sourceKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
    }
    return target;
}
function _object_without_properties_loose(source, excluded) {
    if (source == null) return {};
    var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
    for(i = 0; i < sourceKeys.length; i++){
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
        target[key] = source[key];
    }
    return target;
}
var StyledRoot = (0, _styledcomponents.default)(_Typography.Body2).withConfig({
    displayName: "CardPrice__StyledRoot",
    componentId: "sc-b9ac85b9-0"
})([
    "display:flex;box-sizing:border-box;margin-top:0.75rem;"
]);
var StyledPrice = (0, _styledcomponents.default)(_Price.Price).withConfig({
    displayName: "CardPrice__StyledPrice",
    componentId: "sc-b9ac85b9-1"
})([
    "height:2.5rem;color:",
    ";"
], _tokens.primary);
var StyledOldPrice = (0, _styledcomponents.default)(_Price.Price).withConfig({
    displayName: "CardPrice__StyledOldPrice",
    componentId: "sc-b9ac85b9-2"
})([
    "height:2.5rem;margin-left:0.5rem;color:",
    ";"
], _tokens.tertiary);
var StyledCount = (0, _styledcomponents.default)(_Typography.Body2).withConfig({
    displayName: "CardPrice__StyledCount",
    componentId: "sc-b9ac85b9-3"
})([
    "box-sizing:border-box;height:2.5rem;margin-left:0.5rem;color:",
    ";"
], _tokens.buttonAccent);
var CardPrice = function CardPrice(_0) {
    var count = _0.count, currency = _0.currency, oldPrice = _0.oldPrice, price = _0.price, rest = _object_without_properties(_0, [
        "count",
        "currency",
        "oldPrice",
        "price"
    ]);
    return /*#__PURE__*/ _react.default.createElement(StyledRoot, rest, /*#__PURE__*/ _react.default.createElement(StyledPrice, {
        currency: currency
    }, price), oldPrice && /*#__PURE__*/ _react.default.createElement(StyledOldPrice, {
        currency: currency,
        stroke: true
    }, oldPrice), count ? /*#__PURE__*/ _react.default.createElement(StyledCount, null, "\xd7", count) : '');
};
