"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);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
/*
 *  This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */
var icon_1 = require("@cocalc/frontend/components/icon");
var theme_1 = require("@cocalc/util/theme");
var A_1 = __importDefault(require("components/misc/A"));
var site_name_1 = __importDefault(require("components/share/site-name"));
var antd_1 = require("antd");
var react_1 = require("react");
var router_1 = require("next/router");
var gridProps = { sm: 24, md: 12 };
function Overview() {
    var router = (0, router_1.useRouter)();
    // most likely, user will go to the cart next
    (0, react_1.useEffect)(function () {
        router.prefetch("/store/site-license");
    }, []);
    function Product(_a) {
        var icon = _a.icon, title = _a.title, href = _a.href, children = _a.children;
        return ((0, jsx_runtime_1.jsxs)(antd_1.Col, __assign({}, gridProps, { children: [(0, jsx_runtime_1.jsxs)(A_1.default, __assign({ href: href }, { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { style: { fontSize: "50px", fontWeight: "bold", display: "block" }, name: icon }), (0, jsx_runtime_1.jsx)("p", __assign({ style: { fontSize: "25px", marginBottom: "15px" } }, { children: title }))] })), children] })));
    }
    return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: { textAlign: "center", width: "75%", margin: "0px auto 0px auto" } }, { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { style: {
                    fontSize: "100px",
                    color: theme_1.COLORS.COCALC_BLUE,
                    borderRadius: "50%",
                    backgroundColor: theme_1.COLORS.COCALC_ORANGE,
                    border: "15px solid ".concat(theme_1.COLORS.COCALC_BLUE),
                    padding: "15px 15px 10px 10px",
                    display: "inline-block",
                    margin: "30px 0px 40px 0px",
                    boxShadow: "0px 2px 10px 2px",
                }, name: "shopping-cart" }), (0, jsx_runtime_1.jsxs)("h2", __assign({ style: { marginBottom: "30px" } }, { children: ["Welcome to the ", (0, jsx_runtime_1.jsx)(site_name_1.default, {}), " Store!"] })), (0, jsx_runtime_1.jsxs)(antd_1.Row, __assign({ gutter: [25, 50], style: { marginTop: "30px", marginBottom: "60px" } }, { children: [(0, jsx_runtime_1.jsx)(Product, __assign({ icon: "key", title: "Site License Upgrade", href: "/store/site-license" }, { children: "Upgrade your project, remove the warning banner, get internet access, more CPU and Memory, etc." })), (0, jsx_runtime_1.jsx)(Product, __assign({ icon: "rocket", title: "License Booster", href: "/store/boost" }, { children: "Add additional upgrades to an existing license." })), (0, jsx_runtime_1.jsx)(Product, __assign({ href: "/store/dedicated?type=disk", icon: "save", title: "Dedicated Disk" }, { children: "Add local storage to your project." })), (0, jsx_runtime_1.jsx)(Product, __assign({ href: "/store/dedicated?type=vm", icon: "dedicated", title: "Dedicated VM" }, { children: "Move your project to a much more powerful VM." }))] })), (0, jsx_runtime_1.jsxs)("div", __assign({ style: { marginTop: "4em" } }, { children: ["If you already selected one or more items, view your", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/store/cart" }, { children: "shopping cart" })), " or go straight to", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/store/checkout" }, { children: "checkout" })), "."] })), (0, jsx_runtime_1.jsxs)("p", { children: ["You can also browse your ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/billing" }, { children: "billing records" })), " or", " ", (0, jsx_runtime_1.jsx)(A_1.default, __assign({ href: "/licenses" }, { children: "licenses" })), "."] })] })));
}
exports.default = Overview;
//# sourceMappingURL=overview.js.map