Liferay.Loader.define("dynamic-data-mapping-form-web@4.0.150/admin/js/reducers/rulesReducer.es",["module","exports","require","../eventTypes.es"],(function(e,r,o){window;Object.defineProperty(r,"__esModule",{value:!0}),r.default=function rulesReducer(e,r){switch(r.type){case t.EVENT_TYPES.RULE.ADD:{const{rules:o}=e;return{currentRuleLoc:null,rules:[...o,r.payload]}}case t.EVENT_TYPES.RULE.CHANGE:{const o=r.payload,{loc:t,rule:{actions:n,conditions:l,logicalOperator:c}}=o,u=function _objectWithoutProperties(e,r){if(null==e)return{};var o,t,n=function _objectWithoutPropertiesLoose(e,r){if(null==e)return{};var o,t,n={},l=Object.keys(e);for(t=0;t<l.length;t++)o=l[t],r.indexOf(o)>=0||(n[o]=e[o]);return n}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t<l.length;t++)o=l[t],r.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(o.rule,["actions","conditions","logicalOperator"]),{rules:a}=e;return a.splice(t,1,{actions:n,conditions:l,"logical-operator":u["logical-operator"]?u["logical-operator"]:c}),{currentRuleLoc:null,rules:a}}case t.EVENT_TYPES.RULE.DELETE:{const{rules:o}=e;return{rules:o.filter(((e,o)=>o!==r.payload))}}case t.EVENT_TYPES.RULE.EDIT:{const{loc:e}=r.payload;return{currentRuleLoc:e}}default:return e}};var t=o("../eventTypes.es")}));
//# sourceMappingURL=rulesReducer.es.js.map