import { jsx } from "react/jsx-runtime";
import { createContext, useContext, useMemo } from "react";
const BaseCanvasModeContext = /*#__PURE__*/ createContext(void 0);
const BaseCanvasModeProvider = ({ children, mode })=>{
    const value = useMemo(()=>({
            mode
        }), [
        mode
    ]);
    return /*#__PURE__*/ jsx(BaseCanvasModeContext.Provider, {
        value: value,
        children: children
    });
};
function useBaseCanvasMode() {
    const context = useContext(BaseCanvasModeContext);
    if (!context) throw new Error('useBaseCanvasMode must be used within a BaseCanvasModeProvider');
    return context;
}
export { BaseCanvasModeProvider, useBaseCanvasMode };
