"use client";

import { MindmapBlockView, defaultMindmapData } from "@/components/editor/blocks/MindmapBlock";
import type { BlockNoteEditor } from "@blocknote/core";
import type { CustomBlockSchema } from "@/components/editor/schema";

const stubBlock = {
  id: "dev-mindmap",
  type: "mindmap",
  props: {
    docId: "dev",
    data: defaultMindmapData,
  },
  content: [],
  children: [],
} as any;

const editorStub = {
  updateBlock: () => {
    /* 开发沙盒中跳过持久化 */
  },
} as unknown as BlockNoteEditor<CustomBlockSchema>;

export default function MindmapDevPage() {
  return (
    <div className="fixed inset-0 bg-white">
      <MindmapBlockView block={stubBlock} editor={editorStub} fullscreen />
    </div>
  );
}
