"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=h;var a=e(require("./open-api-v2")),b=e(require("./open-api-v3")),c=require("./async-api-v2"),d=require("lodash");function e(a){return a&&a.__esModule?a:{default:a}}var f=function(c){if(c.openapi)return new b["default"](c);return c.swagger?new a["default"](c):void 0},g=function(a){return(0,c.isSupportedByAsyncAPIV2)(a)?new c.AsyncApiV2(a):new c.AsyncApiV2(a)};function h(b){if(b){if(b.openapi||b.swagger)return f(b);if((0,d.get)(b,"_json.asyncapi"))return g(b)}return new a["default"](b)}