import React, { createContext, useContext, ReactNode } from 'react'; import { WhpConfig } from '../types'; interface EditorConfigContextValue { whpConfig: WhpConfig | null; isWHP: boolean; } const EditorConfigContext = createContext({ whpConfig: null, isWHP: false, }); export const useEditorConfig = () => useContext(EditorConfigContext); export const EditorConfigProvider: React.FC<{ config: WhpConfig | null; children: ReactNode }> = ({ config, children }) => { return ( {children} ); };