import React from 'react';
import { Redirect, Route, Switch } from 'react-router-dom';
import { HomeScene, MethodScene, MethodTagScene, TypeScene, TypeTagScene } from '../scenes';
import { DiffScene } from '../scenes/DiffScene';
import { diffPath } from '../utils';
export var AppRouter = _ref => {
  var {
    api,
    specKey,
    specs,
    toggleNavigation
  } = _ref;
  return React.createElement(Switch, null, React.createElement(Redirect, {
    from: "/",
    to: "/".concat(specKey, "/"),
    exact: true
  }), React.createElement(Route, {
    path: "/".concat(diffPath, "/:l?/:r?")
  }, React.createElement(DiffScene, {
    specs: specs,
    toggleNavigation: toggleNavigation
  })), React.createElement(Route, {
    path: "/:specKey/(methods|types)?",
    exact: true
  }, React.createElement(HomeScene, {
    api: api
  })), React.createElement(Route, {
    path: "/:specKey/methods/:methodTag",
    exact: true
  }, React.createElement(MethodTagScene, {
    api: api
  })), React.createElement(Route, {
    path: "/:specKey/methods/:methodTag/:methodName"
  }, React.createElement(MethodScene, {
    api: api
  })), React.createElement(Route, {
    path: "/:specKey/types/:typeTag",
    exact: true
  }, React.createElement(TypeTagScene, {
    api: api
  })), React.createElement(Route, {
    path: "/:specKey/types/:typeTag/:typeName"
  }, React.createElement(TypeScene, {
    api: api
  })));
};
//# sourceMappingURL=AppRouter.js.map