+ dispatch(searchBarActions.OPEN_SEARCH_VIEW());
+ const savedSearchQueries = services.searchService.getSavedQueries();
+ dispatch(searchBarActions.SET_SAVED_QUERIES(savedSearchQueries));
+ };
+
+export const closeSearchView = () =>
+ (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
+ const isOpen = getState().searchBar.open;
+ if (isOpen) {
+ dispatch(searchBarActions.CLOSE_SEARCH_VIEW());
+ dispatch(searchBarActions.SET_CURRENT_VIEW(SearchView.BASIC));
+ }
+ };
+
+export const navigateToItem = (uuid: string) =>
+ (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
+ dispatch(searchBarActions.CLOSE_SEARCH_VIEW());
+ dispatch(navigateTo(uuid));