import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import React from 'react';
import { observableProject as project } from '../../../shell';
import './index.less';
var CanvasView = /*#__PURE__*/function (_React$Component) {
  _inheritsLoose(CanvasView, _React$Component);
  function CanvasView() {
    var _this;
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
    _this.mountContentFrame = function (frame) {
      project.designer.host.mountContentFrame(frame);
    };
    return _this;
  }
  var _proto = CanvasView.prototype;
  _proto.render = function render() {
    var frameStyle = {};
    return /*#__PURE__*/React.createElement("div", {
      className: "vitis-canvas-view",
      ref: project.designer.mountViewport
    }, /*#__PURE__*/React.createElement("iframe", {
      name: "SimulatorRenderer",
      className: "vitis-simulator-frame",
      style: frameStyle,
      ref: this.mountContentFrame
    }));
  };
  return CanvasView;
}(React.Component);
export { CanvasView as default };