"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: all[name]
    });
}
_export(exports, {
    credentialSettingsKey: function() {
        return credentialSettingsKey;
    },
    frontendSettingKey: function() {
        return frontendSettingKey;
    },
    getDefaultCredentialSettings: function() {
        return getDefaultCredentialSettings;
    },
    getDefaultFileCleanSettings: function() {
        return getDefaultFileCleanSettings;
    },
    getDefaultFrontendSettings: function() {
        return getDefaultFrontendSettings;
    },
    getDefaultServerSettings: function() {
        return getDefaultServerSettings;
    },
    getDefaultSettings: function() {
        return getDefaultSettings;
    },
    getDefaultTimeout: function() {
        return getDefaultTimeout;
    },
    getDefaultWhitelistIpAddresses: function() {
        return getDefaultWhitelistIpAddresses;
    },
    getDefaultWizardSettings: function() {
        return getDefaultWizardSettings;
    },
    printerFileCleanSettingKey: function() {
        return printerFileCleanSettingKey;
    },
    serverSettingsKey: function() {
        return serverSettingsKey;
    },
    timeoutSettingKey: function() {
        return timeoutSettingKey;
    },
    wizardSettingKey: function() {
        return wizardSettingKey;
    }
});
const _serverconstants = require("../server.constants");
const _uuid = require("uuid");
const getDefaultWhitelistIpAddresses = ()=>[
        "::12",
        "127.0.0.1"
    ];
const wizardSettingKey = "wizard";
const getDefaultWizardSettings = ()=>({
        wizardCompleted: false,
        wizardCompletedAt: null,
        wizardVersion: 0
    });
const serverSettingsKey = "server";
const getDefaultServerSettings = ()=>({
        debugSettings: {
            debugSocketIoEvents: false,
            debugSocketReconnect: false,
            debugSocketRetries: false,
            debugSocketSetup: false,
            debugSocketMessages: false,
            debugSocketIoBandwidth: false
        },
        sentryDiagnosticsEnabled: false,
        loginRequired: true,
        registration: false,
        whitelistEnabled: false,
        whitelistedIpAddresses: getDefaultWhitelistIpAddresses(),
        experimentalMoonrakerSupport: false,
        experimentalTypeormSupport: false,
        experimentalClientSupport: false
    });
const credentialSettingsKey = "credentials";
const getDefaultCredentialSettings = ()=>({
        jwtSecret: (0, _uuid.v4)(),
        jwtExpiresIn: _serverconstants.AppConstants.DEFAULT_JWT_EXPIRES_IN,
        refreshTokenAttempts: _serverconstants.AppConstants.DEFAULT_REFRESH_TOKEN_ATTEMPTS,
        refreshTokenExpiry: _serverconstants.AppConstants.DEFAULT_REFRESH_TOKEN_EXPIRY
    });
const frontendSettingKey = "frontend";
const getDefaultFrontendSettings = ()=>({
        gridCols: 8,
        gridRows: 8,
        largeTiles: false
    });
const timeoutSettingKey = "timeout";
const getDefaultTimeout = ()=>({
        apiTimeout: 10000
    });
const printerFileCleanSettingKey = "printerFileClean";
const getDefaultFileCleanSettings = ()=>({
        autoRemoveOldFilesBeforeUpload: false,
        autoRemoveOldFilesAtBoot: false,
        autoRemoveOldFilesCriteriumDays: 7
    });
const getDefaultSettings = ()=>({
        [serverSettingsKey]: getDefaultServerSettings(),
        [wizardSettingKey]: getDefaultWizardSettings(),
        [credentialSettingsKey]: getDefaultCredentialSettings(),
        [printerFileCleanSettingKey]: getDefaultFileCleanSettings(),
        [frontendSettingKey]: getDefaultFrontendSettings(),
        [timeoutSettingKey]: getDefaultTimeout()
    });

//# sourceMappingURL=server-settings.constants.js.map