import { jsx as _jsx } from "react/jsx-runtime";
/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { createContext, useContext } from 'react';
const AppDispatchContext = createContext(undefined);
export const AppDispatchProvider = ({ value, children }) => (_jsx(AppDispatchContext.Provider, { value: value, children: children }));
export const useAppDispatch = () => {
    const dispatch = useContext(AppDispatchContext);
    if (!dispatch) {
        throw new Error('useAppDispatch must be used within AppDispatchProvider');
    }
    return dispatch;
};
//# sourceMappingURL=AppDispatchContext.js.map