import{d as n}from"./p-ae1fa3d6.js";var t=undefined&&undefined.__awaiter||function(n,t,o,e){function i(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(e.next(n))}catch(n){r(n)}}function u(n){try{f(e["throw"](n))}catch(n){r(n)}}function f(n){n.done?o(n.value):i(n.value).then(c,u)}f((e=e.apply(n,t||[])).next())}))};const o={order:n.Index,limit:10};function e(n){const e=Object.assign(Object.assign({},o),n);const i={filtersToReturn:{enabled:true,include:e.include,exclude:e.exclude,options:{order:e.order,limit:e.limit,mincount:e.mincount},rangeFilterSettings:e.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:i.filtersToReturn});n.filters=t}return t})),onResult:t=>{var o,e;if(!(n===null||n===void 0?void 0:n.filterManager)){return t}for(const i of(e=(o=t.apiResponse)===null||o===void 0?void 0:o.queryResults)!==null&&e!==void 0?e:[]){if(i.filters){n.filterManager.initFromListFilters(i.filters)}}return t}}}export{e as l};
//# sourceMappingURL=p-36d55a0d.js.map