"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 });
var jsx_runtime_1 = require("react/jsx-runtime");
var icon_1 = require("@cocalc/frontend/components/icon");
var antd_1 = require("antd");
var router_1 = require("next/router");
var Text = antd_1.Typography.Text;
function ConfigMenu(_a) {
    var main = _a.main;
    var router = (0, router_1.useRouter)();
    // const style = { marginRight: "5px" };
    function select(e) {
        router.push("/store/".concat(e.keyPath[0]), undefined, {
            scroll: false,
        });
    }
    function renderNew() {
        if (new Date().getTime() > new Date("2022-09-01").getTime())
            return;
        return ((0, jsx_runtime_1.jsx)(Text, __assign({ italic: true }, { children: (0, jsx_runtime_1.jsx)("sup", { children: "new" }) })));
    }
    var items = [
        { label: "Store", key: "" },
        { label: "Site License", key: "site-license", icon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "key" }) },
        {
            label: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Boost ", renderNew()] }),
            key: "boost",
            icon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "rocket" }),
        },
        {
            label: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Dedicated ", renderNew()] }),
            key: "dedicated",
            icon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "dedicated" }),
        },
        { label: "Cart", key: "cart", icon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "shopping-cart" }) },
        { label: "Checkout", key: "checkout", icon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "list" }) },
        { label: "Congrats", key: "congrats", icon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "check-circle" }) },
    ];
    return ((0, jsx_runtime_1.jsx)(antd_1.Menu, { mode: "horizontal", selectedKeys: [main], style: { height: "100%", marginBottom: "24px" }, onSelect: select, items: items }));
}
exports.default = ConfigMenu;
//# sourceMappingURL=menu.js.map