"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _react = _interopRequireWildcard(require("react"));

var _reactEasyState = require("react-easy-state");

var _containers = _interopRequireDefault(require("../store/containers"));

var _ContainerLog = _interopRequireDefault(require("../components/ContainerLog"));

var _Shortcuts = _interopRequireDefault(require("../components/Shortcuts"));

var _Loading = _interopRequireDefault(require("../components/Loading"));

var _loadingModal = _interopRequireDefault(require("../store/loadingModal"));

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

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

class App extends _react.Component {
  render() {
    let logLabel = 'Container Log';

    if (_containers.default.active) {
      logLabel += `: ${_containers.default.active.name}`;
    }

    const logContent = _containers.default.noDaemon ? 'Waiting for Docker daemon...' : _containers.default.activeLogs;
    return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_ContainerLog.default, {
      label: logLabel,
      content: logContent
    }), _react.default.createElement(_Shortcuts.default, null), _loadingModal.default.active && _react.default.createElement(_Loading.default, null));
  }

}

var _default = (0, _reactEasyState.view)(App);

exports.default = _default;