"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateAutoRecoveryConfiguration = void 0;
const Validate_1 = __importDefault(require("../../Validate/Validate"));
const validateAutoRecoveryConfiguration = (configuration) => {
    const validation = (0, Validate_1.default)({ configuration }).setError(new Error('Invalid auto recovery configuration')).required();
    if (!configuration.enabled) {
        validation.object({ enabled: 'boolean', autoEnableTimeoutMs: '?number' });
    }
    else {
        validation.object({ enabled: 'boolean', healthcheckIntervalMs: 'number' });
    }
};
exports.validateAutoRecoveryConfiguration = validateAutoRecoveryConfiguration;
//# sourceMappingURL=IAutoRecovery.js.map