@empathyco/x-components
Version:
Empathy X Components
17 lines (15 loc) • 579 B
JavaScript
/**
* Default implementation for the {@link AiGetters.suggestionsSearchRequest} getter.
*
* @param state - Current {@link https://vuex.vuejs.org/guide/state.html | state} of the ai
* module.
*
* @returns The ai request to fetch data from the API.
*
* @public
*/
const suggestionsSearchRequest = ({ queries, params: extraParams, selectedFilters: filters, origin, }) => {
return queries.length ? { queries, extraParams, filters, ...(origin && { origin }) } : null;
};
export { suggestionsSearchRequest };
//# sourceMappingURL=suggestions-search-request.getter.js.map