import React from 'react';
import { InteractiveContentEditor } from '../../interactive-content/editor';
import { learnEditorTools } from './editor-tools';
import type { LessonDocument } from '../types';

/** Learn wrapper around the shared Blog/Docs/Learn Editor.js shell. */
export function LessonBlockEditor({value,onChange}:{value:LessonDocument;onChange:(document:LessonDocument)=>void}){
  return <InteractiveContentEditor
    value={value}
    onChange={onChange}
    tools={learnEditorTools}
    placeholder="Start writing your lesson…"
    hint="Paste or drag images directly into the lesson. Runnable code and terminal blocks use the Learnitive runtime."
    instanceKey="learn-lesson"
  />;
}
