"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"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var Panel = _MyCollapse["default"].Panel;
var AnalysisDetailWrap = function AnalysisDetailWrap(props) {
  var roadName = props.roadName,
    lineNo = props.lineNo,
    header = props.header,
    children = props.children,
    extra = props.extra,
    deviceName = props.deviceName,
    showDevice = props.showDevice,
    _props$lineLabel = props.lineLabel,
    lineLabel = _props$lineLabel === void 0 ? '当前管段' : _props$lineLabel;
  return /*#__PURE__*/_react["default"].createElement(_MyCollapse["default"], {
    defaultActiveKey: ['1'],
    style: {
      marginTop: 16
    }
  }, /*#__PURE__*/_react["default"].createElement(Panel, {
    key: '1',
    header: header,
    extra: /*#__PURE__*/_react["default"].createElement(_space["default"], null, lineNo && /*#__PURE__*/_react["default"].createElement("span", {
      className: "ol-map-analysis-detail-wrap-right-title"
    }, "".concat(lineLabel, "\uFF1A").concat(roadName || '', " ").concat(lineNo || '')), showDevice && /*#__PURE__*/_react["default"].createElement("span", {
      className: "ol-map-analysis-detail-wrap-right-title"
    }, "\u5173\u8054\u8BBE\u5907\uFF1A".concat(deviceName || '-')), extra)
  }, children));
};
AnalysisDetailWrap.propTypes = {
  roadName: _propTypes["default"].string,
  lineNo: _propTypes["default"].string,
  header: _propTypes["default"].string,
  deviceName: _propTypes["default"].string,
  lineLabel: _propTypes["default"].string,
  children: _propTypes["default"].element,
  extra: _propTypes["default"].element,
  showDevice: _propTypes["default"].bool
};
var _default = exports["default"] = AnalysisDetailWrap;
//# sourceMappingURL=index.js.map
