import{d as n}from"./p-8db0d257.js";var t=undefined&&undefined.__awaiter||function(n,t,o,i){function e(n){return n instanceof o?n:new o((function(t){t(n)}))}return new(o||(o=Promise))((function(o,r){function c(n){try{f(i.next(n))}catch(n){r(n)}}function u(n){try{f(i["throw"](n))}catch(n){r(n)}}function f(n){n.done?o(n.value):e(n.value).then(c,u)}f((i=i.apply(n,t||[])).next())}))};const o={order:n.Index,limit:10};function i(n){const i=Object.assign(Object.assign({},o),n);const e={filtersToReturn:{enabled:true,include:i.include,exclude:i.exclude,options:{order:i.order,limit:i.limit,mincount:i.mincount},rangeFilterSettings:i.rangeFilterSettings}};return{klevuModifierId:"listfilters",modifyAfter:n=>t(this,void 0,void 0,(function*(){const t=Array.from(n);for(const n of t){const t=Object.assign(Object.assign({},n.filters),{filtersToReturn:e.filtersToReturn});n.filters=t}return t})),onResult:t=>{var o,i;if(!(n===null||n===void 0?void 0:n.filterManager)){return t}for(const e of(i=(o=t.apiResponse)===null||o===void 0?void 0:o.queryResults)!==null&&i!==void 0?i:[]){if(e.filters&&e.filters.length>0){n.filterManager.initFromListFilters(e.filters)}}return t}}}export{i as l};
//# sourceMappingURL=p-8a15d430.js.map