'use client';
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * Editor theme context - provides theme values to editor components
 */
import { createContext, useContext, useMemo } from 'react';
import { DEFAULT_EDITOR_THEME } from './defaults.js';
const EditorThemeContext = createContext(DEFAULT_EDITOR_THEME);
export function EditorThemeProvider({ theme, children }) {
    const merged = useMemo(() => ({
        ...DEFAULT_EDITOR_THEME,
        ...theme,
    }), [theme]);
    return (_jsx(EditorThemeContext.Provider, { value: merged, children: children }));
}
export function useEditorTheme() {
    return useContext(EditorThemeContext);
}
//# sourceMappingURL=context.js.map