import * as WorkbenchActions from '~/store/workbench/workbench-actions';
import { navigateToRootProject } from '~/store/navigation/navigation-action';
import { dialogActions } from '~/store/dialog/dialog-actions';
import * as WorkbenchActions from '~/store/workbench/workbench-actions';
import { navigateToRootProject } from '~/store/navigation/navigation-action';
import { dialogActions } from '~/store/dialog/dialog-actions';
export const addRouteChangeHandlers = (history: History, store: RootStore) => {
const handler = handleLocationChange(store);
export const addRouteChangeHandlers = (history: History, store: RootStore) => {
const handler = handleLocationChange(store);
const rootMatch = Routes.matchRootRoute(pathname);
const projectMatch = Routes.matchProjectRoute(pathname);
const collectionMatch = Routes.matchCollectionRoute(pathname);
const favoriteMatch = Routes.matchFavoritesRoute(pathname);
const rootMatch = Routes.matchRootRoute(pathname);
const projectMatch = Routes.matchProjectRoute(pathname);
const collectionMatch = Routes.matchCollectionRoute(pathname);
const favoriteMatch = Routes.matchFavoritesRoute(pathname);
const trashMatch = Routes.matchTrashRoute(pathname);
const processMatch = Routes.matchProcessRoute(pathname);
const processLogMatch = Routes.matchProcessLogRoute(pathname);
const trashMatch = Routes.matchTrashRoute(pathname);
const processMatch = Routes.matchProcessRoute(pathname);
const processLogMatch = Routes.matchProcessLogRoute(pathname);
const workflowMatch = Routes.matchWorkflowRoute(pathname);
const sshKeysUserMatch = Routes.matchSshKeysUserRoute(pathname);
const sshKeysAdminMatch = Routes.matchSshKeysAdminRoute(pathname);
const workflowMatch = Routes.matchWorkflowRoute(pathname);
const sshKeysUserMatch = Routes.matchSshKeysUserRoute(pathname);
const sshKeysAdminMatch = Routes.matchSshKeysAdminRoute(pathname);
const keepServicesMatch = Routes.matchKeepServicesRoute(pathname);
const computeNodesMatch = Routes.matchComputeNodesRoute(pathname);
const apiClientAuthorizationsMatch = Routes.matchApiClientAuthorizationsRoute(pathname);
const myAccountMatch = Routes.matchMyAccountRoute(pathname);
const keepServicesMatch = Routes.matchKeepServicesRoute(pathname);
const computeNodesMatch = Routes.matchComputeNodesRoute(pathname);
const apiClientAuthorizationsMatch = Routes.matchApiClientAuthorizationsRoute(pathname);
const myAccountMatch = Routes.matchMyAccountRoute(pathname);
store.dispatch(WorkbenchActions.loadCollection(collectionMatch.params.id));
} else if (favoriteMatch) {
store.dispatch(WorkbenchActions.loadFavorites());
store.dispatch(WorkbenchActions.loadCollection(collectionMatch.params.id));
} else if (favoriteMatch) {
store.dispatch(WorkbenchActions.loadFavorites());
store.dispatch(WorkbenchActions.loadSshKeys);
} else if (sshKeysAdminMatch) {
store.dispatch(WorkbenchActions.loadSshKeys);
store.dispatch(WorkbenchActions.loadSshKeys);
} else if (sshKeysAdminMatch) {
store.dispatch(WorkbenchActions.loadSshKeys);
} else if (keepServicesMatch) {
store.dispatch(WorkbenchActions.loadKeepServices);
} else if (computeNodesMatch) {
} else if (keepServicesMatch) {
store.dispatch(WorkbenchActions.loadKeepServices);
} else if (computeNodesMatch) {
store.dispatch(WorkbenchActions.loadApiClientAuthorizations);
} else if (myAccountMatch) {
store.dispatch(WorkbenchActions.loadMyAccount);
store.dispatch(WorkbenchActions.loadApiClientAuthorizations);
} else if (myAccountMatch) {
store.dispatch(WorkbenchActions.loadMyAccount);