'use client'; import React, { createContext, useContext } from 'react'; import { LexicalEditor, LexicalNode } from 'lexical'; interface MapContextValue { parentEditor: LexicalEditor; lexicalNode: LexicalNode; } const MapContext = createContext(null); export const MapContextProvider = ({ children, value, }: { children: React.ReactNode; value: MapContextValue; }) => { return {children}; }; export const useMapContext = () => { const context = useContext(MapContext); if (!context) { throw new Error('useMapContext must be used within a MapContextProvider'); } return context; };