import { createContext, useContext } from 'react'; import { EditableComponentProps } from '../components/EditableComponent'; export const EditorContext = createContext<{ componentMappings?: { [key: string]: React.ComponentType; }; content?: any; isEditor?: boolean; renderArea?: ( props: T ) => React.ReactElement; renderComponent?: ( props: T ) => React.ReactElement; templateAnnotations?: Record; }>({}); export const useEditor = () => useContext(EditorContext);