2023-01-17 18:04:42 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { createReduxStore, register } from '@wordpress/data';
|
|
|
|
import { Reducer, AnyAction } from 'redux';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { State } from './types';
|
|
|
|
import { STORE_KEY } from './constants';
|
|
|
|
import { reducer } from './reducer';
|
2023-02-23 18:08:59 +00:00
|
|
|
import controls from './controls';
|
2023-01-17 18:04:42 +00:00
|
|
|
import * as actions from './actions';
|
|
|
|
import * as selectors from './selectors';
|
|
|
|
import * as resolvers from './resolvers';
|
|
|
|
|
|
|
|
const store = createReduxStore( STORE_KEY, {
|
|
|
|
reducer: reducer as Reducer< State, AnyAction >,
|
|
|
|
actions,
|
|
|
|
selectors,
|
|
|
|
resolvers,
|
|
|
|
controls,
|
|
|
|
} );
|
|
|
|
|
|
|
|
register( store );
|