function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
import * as React from 'react';
import { IntlProvider } from 'react-intl';
import noop from 'lodash/noop';
import ContentInsightsSummary from '../../ContentInsightsSummary';
const mockGraphData = [{
  start: 1,
  end: 2,
  previewsCount: 150,
  downloadsCount: 50,
  users: new Set(['user1']),
  type: 'day'
}, {
  start: 2,
  end: 3,
  previewsCount: 200,
  downloadsCount: 60,
  users: new Set(['user1', 'user2']),
  type: 'day'
}, {
  start: 3,
  end: 4,
  previewsCount: 180,
  downloadsCount: 45,
  users: new Set(['user2']),
  type: 'day'
}, {
  start: 4,
  end: 5,
  previewsCount: 220,
  downloadsCount: 70,
  users: new Set(['user1', 'user3']),
  type: 'day'
}, {
  start: 5,
  end: 6,
  previewsCount: 190,
  downloadsCount: 55,
  users: new Set(['user2', 'user3']),
  type: 'day'
}, {
  start: 6,
  end: 7,
  previewsCount: 250,
  downloadsCount: 80,
  users: new Set(['user1', 'user2']),
  type: 'day'
}, {
  start: 7,
  end: 8,
  previewsCount: 210,
  downloadsCount: 65,
  users: new Set(['user3']),
  type: 'day'
}];
const defaultProps = {
  graphData: mockGraphData,
  error: undefined,
  isLoading: false,
  onClick: noop,
  previousPeriodCount: 800,
  totalCount: 1217
};
const Wrapper = ({
  children
}) => /*#__PURE__*/React.createElement(IntlProvider, {
  locale: "en"
}, /*#__PURE__*/React.createElement("div", {
  style: {
    width: 300,
    padding: 20,
    backgroundColor: '#fff'
  }
}, children));
export const Default = {
  render: () => /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ContentInsightsSummary, defaultProps))
};
export const WithRedesignEnabled = {
  render: () => /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ContentInsightsSummary, _extends({}, defaultProps, {
    isRedesignEnabled: true
  })))
};
export const Loading = {
  render: () => /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ContentInsightsSummary, _extends({}, defaultProps, {
    isLoading: true
  })))
};
export const LoadingWithRedesign = {
  render: () => /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ContentInsightsSummary, _extends({}, defaultProps, {
    isLoading: true,
    isRedesignEnabled: true
  })))
};
export const WithError = {
  render: () => /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ContentInsightsSummary, _extends({}, defaultProps, {
    error: _extends(new Error('An error occurred'), {
      status: 500
    })
  })))
};
export const WithPositiveTrend = {
  render: () => /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ContentInsightsSummary, _extends({}, defaultProps, {
    previousPeriodCount: 500
  })))
};
export const WithPositiveTrendRedesign = {
  render: () => /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ContentInsightsSummary, _extends({}, defaultProps, {
    previousPeriodCount: 500,
    isRedesignEnabled: true
  })))
};
export const WithNegativeTrend = {
  render: () => /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ContentInsightsSummary, _extends({}, defaultProps, {
    previousPeriodCount: 2000
  })))
};
export const WithNegativeTrendRedesign = {
  render: () => /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ContentInsightsSummary, _extends({}, defaultProps, {
    previousPeriodCount: 2000,
    isRedesignEnabled: true
  })))
};
export default {
  title: 'Features/ContentInsights/tests/visual-regression-tests',
  component: ContentInsightsSummary
};
//# sourceMappingURL=ContentInsightsSummary-visual.stories.js.map