import e from"@babel/runtime/helpers/defineProperty";import t from"lodash/isEqual";import r from"lodash/pick";import{BASE_DEFAULT_FILTERS as i,SELECTION_FILTER_KEYS as s}from"../types.js";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function o(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?n(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var l=function(e){var n=e.get,l=e.setWithMutation,c=e.defaultFilters;return{clearFilters:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"system",r=n().filters,s=n().tempFilters;t(r,i)&&0===Object.keys(s).length||l({filters:o({},i),tempFilters:{}},e)},resetFilters:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"system",r=n().filters,i=n().tempFilters,s=!t(r,c),o=Object.keys(i).length>0;(s||o)&&l({filters:c,tempFilters:{}},e)},resetFilterCriteria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"system",i=n().filters,p=n().tempFilters,f=r(i,s),a=o(o({},c),f),m=!t(i,a)||Object.keys(p).length>0;m&&l({filters:a,tempFilters:{}},e)}}};export{l as createFilterResetActions};
//# sourceMappingURL=createFilterResetActions.js.map
