import type { Order } from '@farfetch/blackout-client'; import type { ResetOrderReturnOptionsEntitiesAction, ResetOrderReturnOptionsStateAction } from '../types/index.js'; import type { StoreState } from '../../types/index.js'; import type { ThunkDispatch } from 'redux-thunk'; /** * Reset order return options state and related entities to its initial value. * * @example * ``` * import { resetOrderReturnOptions } from '@farfetch/blackout-redux'; * * // State and store before executing action * const state = { orders: { orderReturnOptions: { error: { ABCD2F: null }, isLoading: { ABCD2F: true }, result: { ABCD2F : [151073263, 151073264]} } } }; * const store = { * entities: { * returnOptions: { 151073263: {...}, 151073264: {...} }, * } * } * * // Result of resetOrderReturnOptions: * const state = { orders: { orderReturnOptions: { error: {}, isLoading: {}, result: {} } } }; * const store = { entities: { returnOptions: {} } } * * // Usage * dispatch(resetOrderReturnOptions()); * ``` * * @param orderIds - Order ids whose return options state and entities should be reset. * * @returns Dispatch reset order return options state and entities action. */ declare const resetOrderReturnOptions: (orderIds?: Array) => (dispatch: ThunkDispatch) => void; export default resetOrderReturnOptions;