"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const device_client_js_1 = require("@iotize/device-client.js");
const mock_protocol_1 = require("./mock-protocol");
function getMockDeviceFromSnapshot(snapshotData) {
    return __awaiter(this, void 0, void 0, function* () {
        let protocol = mock_protocol_1.MockProtocol.createFromRoutes(snapshotData);
        return device_client_js_1.Tap.fromProtocol(protocol);
    });
}
exports.getMockDeviceFromSnapshot = getMockDeviceFromSnapshot;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9jay1kZXZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AaW90aXplL2RldmljZS1jbGllbnQuanMvdGVzdGluZy8iLCJzb3VyY2VzIjpbIm1vY2svbW9jay1kZXZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQSwrREFBK0M7QUFFL0MsbURBQTZEO0FBRTdELFNBQXNCLHlCQUF5QixDQUFDLFlBQTBCOztRQUN0RSxJQUFJLFFBQVEsR0FBRyw0QkFBWSxDQUFDLGdCQUFnQixDQUFDLFlBQVksQ0FBQyxDQUFDO1FBQzNELE9BQU8sc0JBQUcsQ0FBQyxZQUFZLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDdEMsQ0FBQztDQUFBO0FBSEQsOERBR0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBUYXAgfSBmcm9tICdAaW90aXplL2RldmljZS1jbGllbnQuanMnO1xyXG5cclxuaW1wb3J0IHsgTW9ja1Byb3RvY29sLCBSb3V0ZU1hcHBpbmcgfSBmcm9tICcuL21vY2stcHJvdG9jb2wnO1xyXG5cclxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGdldE1vY2tEZXZpY2VGcm9tU25hcHNob3Qoc25hcHNob3REYXRhOiBSb3V0ZU1hcHBpbmcpOiBQcm9taXNlPFRhcD4ge1xyXG4gICAgbGV0IHByb3RvY29sID0gTW9ja1Byb3RvY29sLmNyZWF0ZUZyb21Sb3V0ZXMoc25hcHNob3REYXRhKTtcclxuICAgIHJldHVybiBUYXAuZnJvbVByb3RvY29sKHByb3RvY29sKTtcclxufVxyXG4iXX0=