import { from } from "rxjs";
import { switchMap } from "rxjs/operators";
import ManagerAPI from "../manager/api";
import { getProviderId } from "../manager";
export default (transport, deviceInfo) => from(ManagerAPI.getDeviceVersion(deviceInfo.targetId, getProviderId(deviceInfo))).pipe(switchMap(deviceVersion => from(ManagerAPI.getCurrentFirmware({
    deviceId: deviceVersion.id,
    version: deviceInfo.version,
    provider: getProviderId(deviceInfo),
}))), switchMap(firmware => ManagerAPI.genuineCheck(transport, {
    targetId: deviceInfo.targetId,
    perso: firmware.perso,
})));
//# sourceMappingURL=genuineCheck.js.map