import { HistoryQuery } from '@empathyco/x-types' ; import { isArrayEmpty } from '../../../../utils/array' ; import { NextQueriesXStoreModule } from '../types' ; /**
 * Default implementation for the  NextQueriesActions . setQueryFromLastHistoryQuery .
 *
 *  param context - The  https of the actions,
 * provided by Vuex.
 *  param historyQueries public export const setQueryFromLastHistoryQuery = ( { state , commit } , historyQueries ) => { if ( ! isArrayEmpty ( historyQueries ) && state . config . loadOnInit ) { commit ( 'setQuery' , historyQueries [ 0 ] . query ) ; } } ;