import './KlevuApiRawResponse-82e24d1e.js';
import { K as KlevuTypeOfRequest } from './klevuFetch-ffde321a.js';
import { c as cleanSearchQuery } from './search-a264065d.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-3da30fa9.js.map