"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireDefault(require("react"));

var _supersetCharts = _interopRequireDefault(require("../../../superset-charts"));

var _utils = require("../dynamic-chart/utils");

var _dynamicFooter = _interopRequireDefault(require("./dynamic-footer"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var prefixCls = "titaui-dynamic-item";

var DynamicAIDialy = function DynamicAIDialy(_ref) {
  var data = _ref.data;

  var chartQuery = _react["default"].useMemo(function () {
    return (0, _utils.getChartProps)(data.biId);
  }, [data.biId]);

  var type = chartQuery.type;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: prefixCls
  }, /*#__PURE__*/_react["default"].createElement(_supersetCharts["default"], _extends({
    feedData: data
  }, chartQuery)), /*#__PURE__*/_react["default"].createElement(_dynamicFooter["default"], {
    data: data,
    dailyReportType: type
  }));
};

var _default = /*#__PURE__*/_react["default"].memo(DynamicAIDialy);

exports["default"] = _default;