"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");
var antd_1 = require("antd");
var loading_1 = __importDefault(require("components/share/loading"));
var register_1 = __importDefault(require("../register"));
var edit_table_1 = __importDefault(require("lib/hooks/edit-table"));
var desc = {
    page_size: "\nMaximum number of files to show before a pager appears.  You can\nkeep this number pretty larger, because CoCalc uses an efficient\nalgorithm for scrolling through a large number of directory entries.\n",
    mask_files: "\nOften there are files in a directory listing that are not hidden\n(they do not start with a dot), but you also do not want to open them\nsince they are autogenerated and not human readable.  If you select\nthis option, by default such files still appear in the directory listing, but\nin light grey, so they are less distracting.\n"
};
(0, register_1.default)({
    path: "system/listings",
    title: "Listings",
    icon: "align-left",
    desc: "Directory listings",
    search: desc,
    Component: function () {
        var _a = (0, edit_table_1.default)({
            accounts: { other_settings: null },
        }), edited = _a.edited, original = _a.original, Save = _a.Save, EditBoolean = _a.EditBoolean, EditNumber = _a.EditNumber;
        if (original == null || edited == null) {
            return (0, jsx_runtime_1.jsx)(loading_1.default, {});
        }
        return ((0, jsx_runtime_1.jsxs)(antd_1.Space, __assign({ direction: "vertical", style: { width: "100%" } }, { children: [(0, jsx_runtime_1.jsx)(Save, {}), (0, jsx_runtime_1.jsx)(EditNumber, { path: "other_settings.page_size", title: "Number of files per page", icon: "copy", desc: desc.page_size, min: 1, max: 10000, units: "files" }), (0, jsx_runtime_1.jsx)(EditBoolean, { icon: "mask", path: "other_settings.mask_files", title: "Mask Files", desc: desc.mask_files, label: "Grey out files in directory listings that you probably do not want to open" })] })));
    },
});
//# sourceMappingURL=listings.js.map