"use strict";
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 });
exports.Line = void 0;
var jsx_runtime_1 = require("react/jsx-runtime");
var icon_1 = require("@cocalc/frontend/components/icon");
var antd_1 = require("antd");
function PricingItem(_a) {
    var icon = _a.icon, children = _a.children, title = _a.title;
    return ((0, jsx_runtime_1.jsx)(antd_1.List.Item, { children: (0, jsx_runtime_1.jsx)(antd_1.Card, __assign({ headStyle: { backgroundColor: "#d9edf7" }, style: { color: "#777" }, type: "inner", title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: icon, style: { marginRight: "10px" } }), " ", (0, jsx_runtime_1.jsx)("strong", { children: title })] }) }, { children: children })) }));
}
exports.default = PricingItem;
var STYLE = { marginRight: "5px", display: "inline-block", color: "#555" };
function Line(_a) {
    var amount = _a.amount, desc = _a.desc;
    if (!amount)
        return ((0, jsx_runtime_1.jsxs)("div", { children: ["---", (0, jsx_runtime_1.jsx)("b", __assign({ style: STYLE }, { children: "\u00A0" }))] }));
    var unit = "";
    if ((desc === null || desc === void 0 ? void 0 : desc.includes("RAM")) || (desc === null || desc === void 0 ? void 0 : desc.includes("Disk"))) {
        unit = "G";
    }
    else if (desc === null || desc === void 0 ? void 0 : desc.includes("CPU")) {
        unit = amount == 1 ? "core" : "cores";
    }
    else if (desc === null || desc === void 0 ? void 0 : desc.includes("Projects")) {
        unit = "simultaneous running";
    }
    return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("b", __assign({ style: STYLE }, { children: [amount, " ", unit] })), " ", desc] }));
}
exports.Line = Line;
//# sourceMappingURL=pricing-item.js.map