"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToggleExplanations = 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 local_storage_1 = require("@cocalc/frontend/misc/local-storage");
const antd_1 = require("antd");
function ToggleExplanations({ showExplanations, setShowExplanations }) {
    return ((0, jsx_runtime_1.jsx)(antd_1.Form.Item, { wrapperCol: { offset: 0, span: 24 }, children: (0, jsx_runtime_1.jsxs)("div", { style: { float: "right", cursor: "pointer" }, onClick: () => setShowExplanations(!showExplanations), children: [(0, jsx_runtime_1.jsx)(antd_1.Switch, { checked: showExplanations, onChange: (show) => {
                        setShowExplanations(show);
                        // ugly and ignores basePath -- change later:
                        (0, local_storage_1.set_local_storage)("store_site_license_show_explanations", show ? "t" : "");
                    } }), " ", "Show explanations"] }) }));
}
exports.ToggleExplanations = ToggleExplanations;
//# sourceMappingURL=toggle-explanations.js.map