"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.AppRouter = void 0;

var _react = _interopRequireDefault(require("react"));

var _reactRouterDom = require("react-router-dom");

var _scenes = require("../scenes");

var _DiffScene = require("../scenes/DiffScene");

var _utils = require("../utils");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var AppRouter = _ref => {
  var {
    api,
    specKey,
    specs,
    toggleNavigation
  } = _ref;
  return _react.default.createElement(_reactRouterDom.Switch, null, _react.default.createElement(_reactRouterDom.Redirect, {
    from: "/",
    to: "/".concat(specKey, "/"),
    exact: true
  }), _react.default.createElement(_reactRouterDom.Route, {
    path: "/".concat(_utils.diffPath, "/:l?/:r?")
  }, _react.default.createElement(_DiffScene.DiffScene, {
    specs: specs,
    toggleNavigation: toggleNavigation
  })), _react.default.createElement(_reactRouterDom.Route, {
    path: "/:specKey/(methods|types)?",
    exact: true
  }, _react.default.createElement(_scenes.HomeScene, {
    api: api
  })), _react.default.createElement(_reactRouterDom.Route, {
    path: "/:specKey/methods/:methodTag",
    exact: true
  }, _react.default.createElement(_scenes.MethodTagScene, {
    api: api
  })), _react.default.createElement(_reactRouterDom.Route, {
    path: "/:specKey/methods/:methodTag/:methodName"
  }, _react.default.createElement(_scenes.MethodScene, {
    api: api
  })), _react.default.createElement(_reactRouterDom.Route, {
    path: "/:specKey/types/:typeTag",
    exact: true
  }, _react.default.createElement(_scenes.TypeTagScene, {
    api: api
  })), _react.default.createElement(_reactRouterDom.Route, {
    path: "/:specKey/types/:typeTag/:typeName"
  }, _react.default.createElement(_scenes.TypeScene, {
    api: api
  })));
};

exports.AppRouter = AppRouter;
//# sourceMappingURL=AppRouter.js.map