import { createAction } from "typesafe-actions" ; import { Bookmark } from "./../types/Bookmark" ; import { ChromeBookmark } from "./../types/ChromeBookmark" ; import { ReduxPersistedState } from "./../types/ReduxPersistedState" ; const setQuery = createAction ( "session/SET_QUERY" , resolve => { return ( query ) => resolve ( query ) ; } ) ; const toggleShowHiddenBookmarks = createAction ( "session/TOGGLE_SHOW_HIDDEN_BOOKMARKS" , resolve => { return ( ) => resolve ( ) ; } ) ; const retrieveBookmarks = createAction ( "bookmark/RETRIEVE_BOOKMARK" , resolve => { return ( ) => resolve ( ) ; } ) ; const retrieveBookmarksSuccess = createAction ( "bookmark/RETRIEVE_BOOKMARK_SUCCESS" , resolve => { return ( foldersById , bookmarksById ) => resolve ( { foldersById , bookmarksById } ) ; } ) ; const moveBookmark = createAction ( "bookmark/MOVE_BOOKMARK" , resolve => { return ( bookmark , oldIndex , newIndex ) => resolve ( { bookmark , oldIndex , newIndex } ) ; } ) ; const moveBookmarkSuccess = createAction ( "bookmark/MOVE_BOOKMARK_SUCCESS" , resolve => { return ( ) => resolve ( ) ; } ) ; const hideFolder = createAction ( "bookmarks/HIDE_FOLDER" , resolve => { return ( bookmarkId ) => resolve ( bookmarkId ) ; } ) ; const showFolder = createAction ( "bookmarks/SHOW_FOLDER" , resolve => { return ( bookmarkId ) => resolve ( bookmarkId ) ; } ) ; const goToNextTheme = createAction ( "theme/GO_TO_NEXT_THEME" , resolve => { return ( ) => resolve ( ) ; } ) ; const rehydrate = createAction ( "other/REHYDRATE_REQUEST" , resolve => { return ( ) => resolve ( ) ; } ) ; const rehydrateSuccess = createAction ( "other/REHYDRATE_SUCCESS" , resolve => { return ( persistedState ) => resolve ( persistedState ) ; } ) ; export const actions = { toggleShowHiddenBookmarks , setQuery , retrieveBookmarks , retrieveBookmarksSuccess , moveBookmark , moveBookmarkSuccess , hideFolder , showFolder , goToNextTheme , rehydrate , rehydrateSuccess } ;