import { createAction } from '@reduxjs/toolkit';
import { validatePayload } from '../../../utils/validate-payload.js';
import { contextDefinition, locationDefinition, viewDefinition, } from './context-validation.js';
export const setContext = createAction('commerce/context/set', (payload) => validatePayload(payload, contextDefinition));
export const setView = createAction('commerce/context/setView', (payload) => validatePayload(payload, viewDefinition));
export const setLocation = createAction('commerce/context/setLocation', (payload) => validatePayload(payload, locationDefinition));
