import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["width", "height", "language", "theme"];
// import * as React from 'react';
import "./index.css";
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
import MonacoEditor from 'react-monaco-editor';
import * as React from 'react';
export default function EditorComponent(props) {
  var _props$width = props.width,
    width = _props$width === void 0 ? '100%' : _props$width,
    _props$height = props.height,
    height = _props$height === void 0 ? '500' : _props$height,
    _props$language = props.language,
    language = _props$language === void 0 ? 'powershell' : _props$language,
    _props$theme = props.theme,
    theme = _props$theme === void 0 ? 'vs-dark' : _props$theme,
    others = _objectWithoutPropertiesLoose(props, _excluded);
  return /*#__PURE__*/React.createElement("div", {
    className: "Editor"
  }, /*#__PURE__*/React.createElement(MonacoEditor, _extends({
    width: width,
    height: height,
    language: language,
    theme: theme
  }, others)));
}

// export default class EditorComponent extends React.Component<any, EditorComponentProps, void> {
//   width: any;
//   height: any;
//   language: any;
//   theme: string;
//   constructor(props) {
//     super(props);
//     this.width = props.width || '100%';
//     this.height = props.height || '500';
//     this.language = props.language || 'powershell';
//     this.theme = 'vs-dark';
//     // const { width = '100%', height = '500', language = 'powershell', theme = 'vs-dark', ...others } = props;
//   }
//   render() {
//     return (
//         <MonacoEditor 
//           width={this.width}
//           height={this.height}
//           language={this.language}
//           theme={this.theme}
//         // {...others}
//       />
//     )
//   }
// }