/** @file CKEditor5 mock for Jest tests */

const React = require('react')

class MockCommand {
  constructor() {
    this.editor = null
  }
}

class MockPlugin {
  constructor() {
    this.pluginName = this.constructor.name
  }
}

const MockCKEditor = React.forwardRef((props, ref) => {
  return React.createElement('div', {
    'data-testid': 'ckeditor',
    ref,
    ...props,
  })
})

MockCKEditor.displayName = 'CKEditor'

module.exports = {
  CKEditor: MockCKEditor,
  Command: MockCommand,
  Plugin: class extends MockPlugin {},
  Bold: class extends MockPlugin {},
  Italic: class extends MockPlugin {},
  Underline: class extends MockPlugin {},
  Link: class extends MockPlugin {},
  List: class extends MockPlugin {},
  Table: class extends MockPlugin {},
  Strikethrough: class extends MockPlugin {},
  Code: class extends MockPlugin {},
  Subscript: class extends MockPlugin {},
  Superscript: class extends MockPlugin {},
  Highlight: class extends MockPlugin {},
  BlockQuote: class extends MockPlugin {},
  Heading: class extends MockPlugin {},
  Image: class extends MockPlugin {},
  MediaEmbed: class extends MockPlugin {},
  HorizontalLine: class extends MockPlugin {},
  PageBreak: class extends MockPlugin {},
  Alignment: class extends MockPlugin {},
  Font: class extends MockPlugin {},
  Indent: class extends MockPlugin {},
  RemoveFormat: class extends MockPlugin {},
  SpecialCharacters: class extends MockPlugin {},
  WordCount: class extends MockPlugin {},
  FindAndReplace: class extends MockPlugin {},
  SourceEditing: class extends MockPlugin {},
  RestrictedEditing: class extends MockPlugin {},
  Style: class extends MockPlugin {},
  ShowBlocks: class extends MockPlugin {},
  CodeBlock: class extends MockPlugin {},
  AutoFormat: class extends MockPlugin {},
  Autolink: class extends MockPlugin {},
  Autosave: class extends MockPlugin {},
  Bookmark: class extends MockPlugin {},
  Emoji: class extends MockPlugin {},
  Fullscreen: class extends MockPlugin {},
  Language: class extends MockPlugin {},
}
