import type { PayloadAction } from '@reduxjs/toolkit'; import type { CommerceEngine } from '../../../app/commerce-engine/commerce-engine.js'; import { type SetContextPayload, type SetCustomPayload, type SetLocationPayload, type SetViewPayload } from './context-actions.js'; export type { SetContextPayload, SetCustomPayload, SetLocationPayload, SetViewPayload, }; /** * The context action creators. * * @group Actions * @category Context */ export interface ContextActionCreators { /** * Sets the entire context. * * @param payload - The action creator payload. * @returns A dispatchable action. */ setContext(payload: SetContextPayload): PayloadAction; /** * Sets the view context property without modifying any other context properties. * * @param payload - The action creator payload. * @returns A dispatchable action. */ setView(payload: SetViewPayload): PayloadAction; /** * Sets the location context property without modifying any other context properties. * * @param payload - The action creator payload. * @returns A dispatchable action. */ setLocation(payload: SetLocationPayload): PayloadAction; /** * Sets the custom context property without modifying any other context properties. * * @param payload - The action creator payload. * @returns A dispatchable action. */ setCustom(payload: SetCustomPayload): PayloadAction; } /** * Loads the commerce context reducer and returns the available context action creators. * * @param engine - The commerce engine. * @returns An object holding the context action creators. * * @group Actions * @category Context */ export declare function loadContextActions(engine: CommerceEngine): ContextActionCreators;