"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkLibs = void 0;
const react_1 = __importDefault(require("react"));
const hw_transport_1 = __importDefault(require("@ledgerhq/hw-transport"));
const errors_1 = require("@ledgerhq/errors");
const logs_1 = require("@ledgerhq/logs");
function checkLibs(libs) {
    check(libs.NotEnoughBalance, errors_1.NotEnoughBalance, "@ledgerhq/errors");
    check(libs.log, logs_1.log, "@ledgerhq/logs");
    check(libs.Transport, hw_transport_1.default, "@ledgerhq/hw-transport");
    check(libs.React, react_1.default, "react");
    function check(remoteInst, localInst, pkg) {
        if (remoteInst && remoteInst !== localInst) {
            console.warn(`
      ______
      | |__| |
      |  ()  |
      |______|

${pkg} NPM package dup detected! You must \`pnpm why -r ${pkg}\` and update the versions accordingly.

`);
            throw new Error("duplicated " + pkg + " library");
        }
    }
}
exports.checkLibs = checkLibs;
//# sourceMappingURL=sanityChecks.js.map