"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isBleUpdateSupported = exports.isUsbUpdateSupported = void 0;
const semver_1 = require("semver");
const usbUpdateSupportedVersions = {
    nanoS: ">=1.6.1",
    nanoX: ">=1.3.0",
    nanoSP: ">=1.0.0",
    stax: ">=1.0.0",
    europa: ">=0.0.0",
    apex: ">=0.0.0",
};
const bleUpdateSupportedVersions = {
    nanoX: ">=2.4.0",
    stax: ">=0.0.0",
    europa: ">=0.0.0",
    apex: ">=0.0.0",
};
function isUsbUpdateSupported(deviceInfo, modelId) {
    return (Boolean(usbUpdateSupportedVersions[modelId]) &&
        (0, semver_1.satisfies)((0, semver_1.coerce)(deviceInfo.version), usbUpdateSupportedVersions[modelId]));
}
exports.isUsbUpdateSupported = isUsbUpdateSupported;
function isBleUpdateSupported(deviceInfo, modelId) {
    return (Boolean(bleUpdateSupportedVersions[modelId]) &&
        (0, semver_1.satisfies)((0, semver_1.coerce)(deviceInfo.version), bleUpdateSupportedVersions[modelId]));
}
exports.isBleUpdateSupported = isBleUpdateSupported;
//# sourceMappingURL=isFirmwareUpdateVersionSupported.js.map