"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("lodash/isEqual"),r=require("lodash/pick"),i=require("../types.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=s(e),l=s(t),o=s(r);function c(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 u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){n.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}exports.createFilterResetActions=function(e){var t=e.get,r=e.setWithMutation,s=e.defaultFilters;return{clearFilters:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"system",s=t().filters,n=t().tempFilters;l.default(s,i.BASE_DEFAULT_FILTERS)&&0===Object.keys(n).length||r({filters:u({},i.BASE_DEFAULT_FILTERS),tempFilters:{}},e)},resetFilters:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"system",i=t().filters,n=t().tempFilters,o=!l.default(i,s),c=Object.keys(n).length>0;(o||c)&&r({filters:s,tempFilters:{}},e)},resetFilterCriteria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"system",n=t().filters,c=t().tempFilters,f=o.default(n,i.SELECTION_FILTER_KEYS),a=u(u({},s),f),p=!l.default(n,a)||Object.keys(c).length>0;p&&r({filters:a,tempFilters:{}},e)}}};
//# sourceMappingURL=createFilterResetActions.js.map
