'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports['default'] = undefined;

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

var _inherits2 = require('babel-runtime/helpers/inherits');

var _inherits3 = _interopRequireDefault(_inherits2);

var _class;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _reactRouterDom = require('react-router-dom');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var Iframe = (0, _reactRouterDom.withRouter)(_class = function (_Component) {
  (0, _inherits3['default'])(Iframe, _Component);

  function Iframe() {
    (0, _classCallCheck3['default'])(this, Iframe);
    return (0, _possibleConstructorReturn3['default'])(this, (Iframe.__proto__ || Object.getPrototypeOf(Iframe)).apply(this, arguments));
  }

  (0, _createClass3['default'])(Iframe, [{
    key: 'render',
    value: function render() {
      var _props = this.props,
          tab = _props.tab,
          location = _props.history.location,
          MenuStore = _props.MenuStore;

      var url = '/' + tab.url + location.search;

      return _react2['default'].createElement(
        'div',
        { style: { width: '100%', height: 'calc(100vh - 88px)', overflow: 'hidden' } },
        _react2['default'].createElement('iframe', {
          title: 'iframe',
          src: url,
          width: '100%',
          height: '100%'
        })
      );
    }
  }]);
  return Iframe;
}(_react.Component)) || _class;

exports['default'] = Iframe;