"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LinkToStore = void 0;
const 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
 */
const icon_1 = require("@cocalc/frontend/components/icon");
const antd_1 = require("antd");
const router_1 = require("next/router");
const STYLE = {
    fontSize: "150%",
    fontWeight: "bold",
    textAlign: "center",
    marginTop: "30px",
};
function LinkToStore(props) {
    const { conf } = props;
    const router = (0, router_1.useRouter)();
    const params = Object.entries(conf)
        .map(([key, value]) => `${key}=${value}`)
        .join("&");
    const url = `/store/site-license?${params}`;
    return ((0, jsx_runtime_1.jsx)("div", { style: STYLE, children: (0, jsx_runtime_1.jsx)(antd_1.Button, { size: "large", type: "default", onClick: () => router.push(url), icon: (0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "shopping-cart" }), children: "Select" }) }));
}
exports.LinkToStore = LinkToStore;
//# sourceMappingURL=link.js.map