"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _components = require("@vtx/components");
var _antd = require("antd");
var _react = _interopRequireDefault(require("react"));
var _useSettings2 = _interopRequireDefault(require("../../../vm-hooks/useSettings"));
var _vmInfoCollection = _interopRequireDefault(require("../../../vm-info-collection"));
var _vmNodata = _interopRequireDefault(require("../../../vm-nodata"));
var _api = require("../../api");
var _Map = _interopRequireDefault(require("./Map"));
require("./index.less");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var BaseInfo = function BaseInfo(props) {
  var id = props.id;
  var _useSettings = (0, _useSettings2["default"])(),
    theme = _useSettings.theme;
  var _BaseService$useBaseI = _api.BaseService.useBaseInfo(id),
    baseInfo = _BaseService$useBaseI.baseInfo,
    photos = _BaseService$useBaseI.photos;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "default-baseContent ".concat(theme)
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "default-base"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "default-base-img"
  }, photos.length ? /*#__PURE__*/_react["default"].createElement(_components.VtxImage.PreviewGroup, null, /*#__PURE__*/_react["default"].createElement(_antd.Carousel, {
    style: {
      width: '370px',
      height: '244px'
    }
  }, photos.map(function (item) {
    return /*#__PURE__*/_react["default"].createElement(_components.VtxImage, {
      key: item.id,
      src: "/cloudFile/common/downloadFile?id=".concat(item.id),
      alt: item.name
    });
  }))) : /*#__PURE__*/_react["default"].createElement(_vmNodata["default"], null)), /*#__PURE__*/_react["default"].createElement(_vmInfoCollection["default"], {
    data: baseInfo,
    gap: 10
  })), /*#__PURE__*/_react["default"].createElement("div", {
    className: "default-base-map"
  }, /*#__PURE__*/_react["default"].createElement(_Map["default"], null)));
};
var _default = BaseInfo;
exports["default"] = _default;
//# sourceMappingURL=index.js.map
