"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const semver_1 = require("semver");
const live_env_1 = require("@ledgerhq/live-env");
const deviceVersionRangesForUpdate = {
    nanoS: ">=1.6.1",
    nanoX: ">=1.3.0",
    nanoSP: ">=1.0.0",
    stax: ">=1.0.0",
};
// TODO when BLE FW update is released, we'll have to add support for BLE/OTG
// version checks instead of a single version.
exports.default = (deviceInfo, modelId) => (0, live_env_1.getEnv)("DISABLE_FW_UPDATE_VERSION_CHECK") ||
    (Boolean(deviceVersionRangesForUpdate[modelId]) &&
        (0, semver_1.satisfies)((0, semver_1.coerce)(deviceInfo.version), deviceVersionRangesForUpdate[modelId]));
//# sourceMappingURL=isFirmwareUpdateVersionSupported.js.map