"use strict";

function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireWildcard(require("react"));
var _Info = _interopRequireDefault(require("./Info"));
var _SummaryStatistics = _interopRequireDefault(require("./SummaryStatistics"));
require("./index.less");
var _antd = require("antd");
var _vmCard = _interopRequireDefault(require("../../../vm-card"));
var _CollectRule = _interopRequireDefault(require("./CollectRule"));
var _vmInfoCollection = _interopRequireDefault(require("../../../vm-info-collection"));
var _index2 = require("../../index");
var _config = require("../../config");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var Basic = function Basic() {
  var _a;
  var _useContext = (0, _react.useContext)(_index2.RestaurantContext),
    data = _useContext.info,
    openUnit = _useContext.openUnit;
  var contractItem = ((_a = data === null || data === void 0 ? void 0 : data.contract) === null || _a === void 0 ? void 0 : _a[0]) || {};
  var dataSource = [{
    key: '',
    label: '服务状态',
    value: (/*#__PURE__*/_react["default"].createElement(_antd.Space, null, contractItem.status && /*#__PURE__*/_react["default"].createElement(_antd.Badge, {
      color: _config.signColorMap[contractItem.status]
    }), contractItem.statusStr || '--'))
  }, {
    key: '',
    label: '签约企业',
    value: contractItem.signTransUnitName,
    render: function render() {
      return /*#__PURE__*/_react["default"].createElement("a", {
        onClick: function onClick() {
          return openUnit && openUnit({
            id: contractItem.signTransUnitId,
            title: contractItem.signTransUnitName
          });
        }
      }, contractItem.signTransUnitName);
    }
  }];
  return /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    gutter: [10, 10],
    style: {
      padding: '0 10px 10px'
    }
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 12
  }, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
    gutter: [10, 10]
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 24
  }, /*#__PURE__*/_react["default"].createElement(_vmCard["default"], {
    title: "\u57FA\u672C\u4FE1\u606F"
  }, /*#__PURE__*/_react["default"].createElement(_Info["default"], null))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 24
  }, /*#__PURE__*/_react["default"].createElement(_vmCard["default"], {
    title: "\u7B7E\u7EA6\u4E0E\u4FE1\u606F"
  }, /*#__PURE__*/_react["default"].createElement(_vmInfoCollection["default"], {
    data: dataSource,
    horizontal: true,
    width: '50%',
    ellipsis: true
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 24
  }, /*#__PURE__*/_react["default"].createElement(_CollectRule["default"], null)))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
    span: 12
  }, /*#__PURE__*/_react["default"].createElement(_SummaryStatistics["default"], null)));
};
var _default = exports["default"] = Basic;
//# sourceMappingURL=index.js.map
