import './KlevuApiRawResponse-82e24d1e.js';
import { K as KlevuTypeOfRequest } from './klevuFetch-4a3f7817.js';
import { c as cleanSearchQuery } from './search-ba83fe91.js';

const defaults = {
    id: "suggestions",
    limit: 5,
};
/**
 * Return suggestion on given search term
 *
 * @category Query
 * @param term search term
 * @param options
 * @returns
 */
function suggestions(term, options) {
    const params = Object.assign(Object.assign({}, defaults), options);
    const query = Object.assign({ typeOfRequest: KlevuTypeOfRequest.Suggestion, query: cleanSearchQuery(term) }, params);
    return {
        klevuFunctionId: "suggestions",
        suggestions: [query],
    };
}

export { suggestions as s };

//# sourceMappingURL=suggestions-a6d084dd.js.map