/**
 * 维保类型分析
 */
import { sumBy } from 'lodash';
import { VmEmpty, VmPieCharts } from "../../_components";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var RmType = function RmType(props) {
  var data = props.data,
    loading = props.loading;
  return /*#__PURE__*/_jsxs("div", {
    className: "rm-type",
    children: ["\u7EF4\u4FDD\u7C7B\u578B\u5206\u6790", /*#__PURE__*/_jsx("div", {
      className: "rm-type-chart",
      children: (data === null || data === void 0 ? void 0 : data.length) > 0 ? /*#__PURE__*/_jsx(VmPieCharts, {
        dataList: data,
        name: "\u7EF4\u4FDD\u7C7B\u578B",
        title: "\u603B\u6570(\u6B21)",
        total: sumBy(data, 'value'),
        loading: loading,
        unit: "\u6B21"
      }) : /*#__PURE__*/_jsx(VmEmpty, {
        type: "NO_CHART",
        style: {
          height: '100%',
          marginLeft: '50%',
          transform: 'translateX(-50%)'
        }
      })
    })]
  });
};
export default RmType;