"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const antd_1 = require("antd");
const loading_1 = __importDefault(require("components/share/loading"));
const register_1 = __importDefault(require("../register"));
const edit_table_1 = __importDefault(require("lib/hooks/edit-table"));
const desc = {
    page_size: `
Maximum number of files to show before a pager appears.  You can
keep this number pretty larger, because CoCalc uses an efficient
algorithm for scrolling through a large number of directory entries.
`,
    mask_files: `
Often there are files in a directory listing that are not hidden
(they do not start with a dot), but you also do not want to open them
since they are autogenerated and not human readable.  If you select
this option, by default such files still appear in the directory listing, but
in light grey, so they are less distracting.
`
};
(0, register_1.default)({
    path: "system/listings",
    title: "Listings",
    icon: "align-left",
    desc: "Directory listings",
    search: desc,
    Component: () => {
        const { edited, original, Save, EditBoolean, EditNumber } = (0, edit_table_1.default)({
            accounts: { other_settings: null },
        });
        if (original == null || edited == null) {
            return (0, jsx_runtime_1.jsx)(loading_1.default, {});
        }
        return ((0, jsx_runtime_1.jsxs)(antd_1.Space, { 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