
        const history = JSON.parse(localStorage.getItem('mindmap-history') || '[]');
        const item = history.find(item => item.id === id);

        if (item) {
            const viewer = document.getElementById('mindmap-viewer');
            const content = document.getElementById('viewer-content');
            const title = document.getElementById('viewer-title');
            document
                .getElementById('edit-mode-button')
                .style
                .display = 'flex';

      