import _extends from '@babel/runtime/helpers/extends';
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import 'core-js/modules/es.symbol.js';
import 'core-js/modules/es.array.filter.js';
import 'core-js/modules/es.array.iterator.js';
import 'core-js/modules/es.object.get-own-property-descriptor.js';
import 'core-js/modules/es.object.get-own-property-descriptors.js';
import 'core-js/modules/es.object.keys.js';
import 'core-js/modules/es.object.to-string.js';
import 'core-js/modules/web.dom-collections.for-each.js';
import 'core-js/modules/web.dom-collections.iterator.js';
import React__default from 'react';
import Card from '../Card/Card.js';
import { CARD_SIZES, CARD_TYPES } from '../../constants/LayoutConstants.js';
import { CardPropTypes, SparklineChartCardPropTypes } from '../../constants/CardPropTypes.js';

var _excluded = ["title", "values", "content", "size", "breakpoint", "locale", "isLoading", "testId", "footerContent", "isExpanded", "i18n", "style"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var propTypes = _objectSpread(_objectSpread({}, CardPropTypes), SparklineChartCardPropTypes);
var defaultProps = {
  size: CARD_SIZES.MEDIUMWIDE,
  title: null,
  content: {
    xLabel: 'x label',
    yLabel: 'y label'
  },
  footerContent: null,
  locale: 'en',
  values: []
};
var SparklineChartCard = function SparklineChartCard(_ref) {
  var title = _ref.title,
    values = _ref.values,
    content = _ref.content,
    size = _ref.size,
    breakpoint = _ref.breakpoint,
    locale = _ref.locale,
    isLoading = _ref.isLoading,
    testId = _ref.testId,
    footerContent = _ref.footerContent,
    isExpanded = _ref.isExpanded,
    i18n = _ref.i18n;
    _ref.style;
    var others = _objectWithoutProperties(_ref, _excluded);
  return /*#__PURE__*/React__default.createElement(Card, _extends({
    title: title,
    size: size,
    breakpoint: breakpoint,
    locale: locale,
    isExpanded: isExpanded,
    isLoading: isLoading,
    testId: testId,
    footerContent: !isExpanded ? footerContent : null,
    i18n: i18n,
    data: values,
    type: CARD_TYPES.SPARKLINE_CHART,
    content: content
  }, others));
};
SparklineChartCard.propTypes = propTypes;
SparklineChartCard.defaultProps = defaultProps;
SparklineChartCard.__docgenInfo = {
  "description": "",
  "methods": [],
  "displayName": "SparklineChartCard",
  "props": {
    "size": {
      "defaultValue": {
        "value": "CARD_SIZES.MEDIUMWIDE",
        "computed": true
      },
      "required": false
    },
    "title": {
      "defaultValue": {
        "value": "null",
        "computed": false
      },
      "required": false
    },
    "content": {
      "defaultValue": {
        "value": "{\n  xLabel: 'x label',\n  yLabel: 'y label',\n}",
        "computed": false
      },
      "required": false
    },
    "footerContent": {
      "defaultValue": {
        "value": "null",
        "computed": false
      },
      "required": false
    },
    "locale": {
      "defaultValue": {
        "value": "'en'",
        "computed": false
      },
      "required": false
    },
    "values": {
      "defaultValue": {
        "value": "[]",
        "computed": false
      },
      "required": false
    }
  },
  "composes": ["../../constants/CardPropTypes"]
};
var SparklineChartCard$1 = SparklineChartCard;

export { SparklineChartCard$1 as default };
