"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");
/*
 *  This file is part of CoCalc: Copyright © 2021 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */
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)();
    function select(e) {
        router.push("/billing/".concat(e.keyPath[0]), undefined, {
            scroll: false,
        });
    }
    var items = [
        { label: (0, jsx_runtime_1.jsx)(Text, __assign({ strong: true }, { children: "Billing" })), key: "" },
        { label: "Cards", key: "cards", icon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "credit-card" }) },
        {
            label: "Subscriptions",
            key: "subscriptions",
            icon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "calendar" }),
        },
        {
            label: "Invoices and Receipts",
            key: "receipts",
            icon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "list" }),
        },
    ];
    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