import { NextQueriesRequest } from '@empathyco/x-adapter' ; import { NextQuery } from '@empathyco/x-types' ; import { createFetchAndSaveActions } from '../../../../store/utils/fetch-and-save-action.utils' ; import { NextQueriesActionContext } from '../types' ; const { fetchAndSave , cancelPrevious } = createFetchAndSaveActions < NextQueriesActionContext , NextQueriesRequest | null , NextQuery [ ] | null > ( { fetch ( { dispatch } , request ) { return dispatch ( 'fetchNextQueries' , request ) ; } , onSuccess ( { commit } , nextQueries ) { if ( nextQueries ) { commit ( 'setNextQueries' , nextQueries ) ; } } } ) ; /**
 * Default implementation for  NextQueriesActions . fetchAndSaveNextQueries action.
 *
 *  public export const fetchAndSaveNextQueries = fetchAndSave ; /**
 * Default implementation for  NextQueriesActions . cancelFetchAndSaveNextQueries action.
 *
 *  public export const cancelFetchAndSaveNextQueries = cancelPrevious ;