{"size": 1550, "ext": "js", "max_stars_repo_path": "assets/js/googlesitekit/modules/datastore/index.js", "max_stars_repo_name": "felixarntz/site-kit-wp", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/js/googlesitekit/modules/datastore/index.js", "max_issues_repo_name": "felixarntz/site-kit-wp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/js/googlesitekit/modules/datastore/index.js", "max_forks_repo_name": "felixarntz/site-kit-wp", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.8309859155, "max_line_length": 75, "alphanum_fraction": 0.7425806452}
/**
 * core/modules data store
 *
 * Site Kit by Google, Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * Internal dependencies
 */
import Data from 'googlesitekit-data';
import modules from './modules';

export const INITIAL_STATE = Data.collectState(
	modules.INITIAL_STATE,
);

import { STORE_NAME } from './constants';
export { STORE_NAME };

export const actions = Data.addInitializeAction(
	Data.collectActions(
		Data.commonActions,
		modules.actions,
	)
);

export const controls = Data.collectControls(
	Data.commonControls,
	modules.controls,
);

export const reducer = Data.addInitializeReducer(
	INITIAL_STATE,
	Data.collectReducers(
		modules.reducer,
	)
);

export const resolvers = Data.collectResolvers(
	modules.resolvers,
);

export const selectors = Data.collectSelectors(
	modules.selectors,
);

const store = {
	actions,
	controls,
	reducer,
	resolvers,
	selectors,
};

// Register this store on the global registry.
Data.registerStore( STORE_NAME, store );

export default store;
