2020-02-25 11:36:53 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { registerStore } from '@wordpress/data';
|
2020-03-19 11:50:51 +00:00
|
|
|
import { controls as dataControls } from '@wordpress/data-controls';
|
2020-02-25 11:36:53 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { STORE_KEY } from './constants';
|
|
|
|
import * as selectors from './selectors';
|
|
|
|
import * as actions from './actions';
|
|
|
|
import * as resolvers from './resolvers';
|
|
|
|
import reducer from './reducers';
|
2020-03-19 11:50:51 +00:00
|
|
|
import { controls } from '../shared-controls';
|
2020-02-25 11:36:53 +00:00
|
|
|
|
|
|
|
registerStore( STORE_KEY, {
|
2021-02-24 01:36:24 +00:00
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
|
|
// @ts-ignore -- Can't figure out how to resolve this now
|
2020-02-25 11:36:53 +00:00
|
|
|
reducer,
|
|
|
|
actions,
|
2021-02-24 01:36:24 +00:00
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
|
|
// @ts-ignore -- not sure how to resolve the type issues here.
|
2020-03-19 11:50:51 +00:00
|
|
|
controls: { ...dataControls, ...controls },
|
2020-02-25 11:36:53 +00:00
|
|
|
selectors,
|
|
|
|
resolvers,
|
|
|
|
} );
|
|
|
|
|
|
|
|
export const CART_STORE_KEY = STORE_KEY;
|