import React from "react";
import { Editor as KendoEditor } from "@progress/kendo-react-editor";
import { EditorProps } from "./EditorProps";

const Editor: React.FC<EditorProps> = ({
  dataTestId,
  ariaDescribedBy,
  ariaLabel,
  ariaLabelledBy,
  className,
  contentStyle,
  defaultContent,
  defaultEditMode,
  dir,
  keyboardNavigation,
  preserveWhitespace,
  resizable,
  style,
  tools,
  value,
  onBlur,
  onChange,
  onExecute,
  onFocus,
  onMount,
  onPasteHtml,
}) => (
  <div data-test-id={dataTestId}>
    <KendoEditor
      ariaDescribedBy={ariaDescribedBy}
      ariaLabel={ariaLabel}
      ariaLabelledBy={ariaLabelledBy}
      className={className}
      contentStyle={contentStyle}
      defaultContent={defaultContent}
      defaultEditMode={defaultEditMode}
      dir={dir}
      keyboardNavigation={keyboardNavigation}
      preserveWhitespace={preserveWhitespace}
      resizable={resizable}
      style={style}
      tools={tools}
      value={value}
      onBlur={onBlur}
      onChange={onChange}
      onExecute={onExecute}
      onFocus={onFocus}
      onMount={onMount}
      onPasteHtml={onPasteHtml}
    />
  </div>
);

export default Editor;
