"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _MyCollapse = _interopRequireDefault(require("../MyCollapse"));
var _space = _interopRequireDefault(require("antd/lib/space"));
var _MyTag = _interopRequireDefault(require("../MyTag"));
var _classnames = _interopRequireDefault(require("classnames"));
var _StreamStatusIcon = _interopRequireDefault(require("./StreamStatusIcon"));
require("./index.less");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var Panel = _MyCollapse["default"].Panel;
var StreamInfoWrap = function StreamInfoWrap(_ref) {
  var isError = _ref.isError,
    lineNo = _ref.lineNo,
    isUp = _ref.isUp,
    children = _ref.children;
  return /*#__PURE__*/_react["default"].createElement(_MyCollapse["default"], {
    defaultActiveKey: ['1'],
    style: {
      marginTop: 16
    }
  }, /*#__PURE__*/_react["default"].createElement(Panel, {
    key: '1',
    header: /*#__PURE__*/_react["default"].createElement(_space["default"], null, lineNo, /*#__PURE__*/_react["default"].createElement(_MyTag["default"], {
      text: isUp ? '上游节点' : '下游节点',
      color: isUp ? '#1890FF' : '#00B5B4'
    })),
    extra: /*#__PURE__*/_react["default"].createElement("div", {
      className: (0, _classnames["default"])('ol-map-analysis-stream-status', {
        error: isError
      })
    }, /*#__PURE__*/_react["default"].createElement(_StreamStatusIcon["default"], {
      stopColors: isError ? ['rgb(255,56,56)', 'rgb(255,115,115)'] : ['rgb(0,191,94)', 'rgb(23,230,133)'],
      color: 'rgb(0, 183, 103)'
    }), /*#__PURE__*/_react["default"].createElement("span", null, "\u76D1\u6D4B\u7ED3\u679C:", isError ? '异常' : '正常'))
  }, children));
};
StreamInfoWrap.propTypes = {
  isError: _propTypes["default"].bool,
  isUp: _propTypes["default"].bool,
  deviceFacilityId: _propTypes["default"].string,
  lineNo: _propTypes["default"].string,
  children: _propTypes["default"].element
};
var _default = exports["default"] = StreamInfoWrap;
//# sourceMappingURL=index.js.map
