"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = Connection;
var _raft = require("@robotical/webapp-types/dist-types/src/types/raft");
var _connectButton = _interopRequireDefault(require("./connect-button"));
var _disconnectButotn = _interopRequireDefault(require("./disconnect-butotn"));
var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function Connection(_ref) {
  let {
    connectedCog,
    setConnectedCog,
    handleDisconnect,
    handleConnect
  } = _ref;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
    className: _stylesModule.default.connectionContainer,
    children: connectedCog ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_disconnectButotn.default, {
      onClickDisconnect: handleDisconnect,
      connectedRaft: connectedCog,
      robotType: _raft.RaftTypeE.COG
    }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_connectButton.default, {
      raftType: _raft.RaftTypeE.COG,
      onConnect: handleConnect
    })
  });
}