2021-04-20 15:44:49 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
2021-09-21 13:25:44 +00:00
|
|
|
import {
|
|
|
|
triggerFragmentRefresh,
|
|
|
|
triggerAddedToCartEvent,
|
|
|
|
triggerAddingToCartEvent,
|
|
|
|
} from '@woocommerce/base-utils';
|
2021-04-20 15:44:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Default export for registering the controls with the store.
|
|
|
|
*
|
|
|
|
* @return {Object} An object with the controls to register with the store on the controls property of the registration object.
|
|
|
|
*/
|
|
|
|
export const controls = {
|
|
|
|
UPDATE_LEGACY_CART_FRAGMENTS() {
|
|
|
|
triggerFragmentRefresh();
|
|
|
|
},
|
2021-09-21 13:25:44 +00:00
|
|
|
TRIGGER_ADDING_TO_CART_EVENT() {
|
|
|
|
triggerAddingToCartEvent();
|
|
|
|
},
|
|
|
|
TRIGGER_ADDED_TO_CART_EVENT( preserveCartData ) {
|
|
|
|
triggerAddedToCartEvent( preserveCartData );
|
|
|
|
},
|
2021-04-20 15:44:49 +00:00
|
|
|
};
|