UNPKG

@shopgate/engage

Version:
4 lines 736 B
import{connect}from'react-redux';import{getFulfillmentSchedulingEnabled}from'@shopgate/engage/core';import{getActiveFulfillmentSlot,checkActiveFulfillmentSlotBelongsToPreferredLocation}from'@shopgate/engage/cart/cart.selectors';import{getIsCartStateConfigurable}from"../../selectors";/** * Creates the mapStateToProps connector function. * @returns {Function} */var makeMapStateToProps=function makeMapStateToProps(){return function(state){return{isFulfillmentScheduling:getFulfillmentSchedulingEnabled(state),fulfillmentSlot:getActiveFulfillmentSlot(state),isFulfillmentSlotValid:checkActiveFulfillmentSlotBelongsToPreferredLocation(state),editable:getIsCartStateConfigurable(state)};};};export default connect(makeMapStateToProps);