"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 });
exports.ToggleExplanations = void 0;
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 local_storage_1 = require("@cocalc/frontend/misc/local-storage");
var antd_1 = require("antd");
function ToggleExplanations(_a) {
    var showExplanations = _a.showExplanations, setShowExplanations = _a.setShowExplanations;
    return ((0, jsx_runtime_1.jsx)(antd_1.Form.Item, __assign({ wrapperCol: { offset: 0, span: 24 } }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ style: { float: "right", cursor: "pointer" }, onClick: function () { return setShowExplanations(!showExplanations); } }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Switch, { checked: showExplanations, onChange: function (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