import type { ResetBagAction, ResetBagEntitiesAction } from '../types/index.js'; import type { StoreState } from '../../types/index.js'; import type { ThunkDispatch } from 'redux-thunk'; /** * Reset bag state and related entities to its initial value. * * @example * ``` * import { resetBag } from '@farfetch/blackout-redux'; * * // State and store before executing action * const state = { id: '123', error: null, isLoading: false, result: {...}, items: {...} }; * const store = { * entities: { * bagItems: { 1: {...} } * } * } * * // Result of resetBag: * const state = { id: null, error: null, isLoading: false, result: null, items: {} } * const store = { entities: {} } * * // Usage * dispatch(resetBag()); * * ``` * * @returns Dispatch reset bag state and entities action. */ declare const resetBag: () => (dispatch: ThunkDispatch) => void; export default resetBag;