import { satisfies, coerce } from "semver";
import { getEnv } from "@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.
export default (deviceInfo, modelId) => getEnv("DISABLE_FW_UPDATE_VERSION_CHECK") ||
    (Boolean(deviceVersionRangesForUpdate[modelId]) &&
        satisfies(coerce(deviceInfo.version), deviceVersionRangesForUpdate[modelId]));
//# sourceMappingURL=isFirmwareUpdateVersionSupported.js.map