"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
var _react = _interopRequireDefault(require("react"));
var _shell = require("../../../shell");
require("./index.less");
var CanvasView = exports["default"] = /*#__PURE__*/function (_React$Component) {
  (0, _inheritsLoose2["default"])(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) {
      _shell.observableProject.designer.host.mountContentFrame(frame);
    };
    return _this;
  }
  var _proto = CanvasView.prototype;
  _proto.render = function render() {
    var frameStyle = {};
    return /*#__PURE__*/_react["default"].createElement("div", {
      className: "vitis-canvas-view",
      ref: _shell.observableProject.designer.mountViewport
    }, /*#__PURE__*/_react["default"].createElement("iframe", {
      name: "SimulatorRenderer",
      className: "vitis-simulator-frame",
      style: frameStyle,
      ref: this.mountContentFrame
    }));
  };
  return CanvasView;
}(_react["default"].Component);