UNPKG

@empathyco/x-components

Version:
18 lines (16 loc) 656 B
/** * Default implementation for the {@link NextQueriesGetters.nextQueries} getter. * * @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the next * queries module. * @returns The next queries filtered by the searched queries or not. * @public */ const nextQueries = ({ nextQueries, searchedQueries, config, }) => { const queriesToFilter = searchedQueries.map((historyQuery) => historyQuery.query); return config.hideSessionQueries ? nextQueries.filter(({ query }) => !queriesToFilter.includes(query)) : nextQueries; }; export { nextQueries }; //# sourceMappingURL=next-queries.getter.js.map