"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = _interopRequireDefault(require("react"));
var _storybookSnapper = require("storybook-snapper");
var _RadarChart = _interopRequireDefault(require("../RadarChart"));
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/RadarChart/test/RadarChart.visual.jsx",
  _this = void 0;
var commonProps = {};
var threeDataPoints = [{
  value: 10,
  label: 'Site Sessions'
}, {
  value: 20,
  label: 'Visitors'
}, {
  value: 30,
  label: 'Total Orders'
}];
var tenDataPoints = [{
  value: 70,
  label: 'Data point 1',
  color: 'A1'
}, {
  value: 70,
  label: 'Data point 2',
  color: 'A1'
}, {
  value: 40,
  label: 'Data point 3',
  color: 'A1'
}, {
  value: 70,
  label: 'Data point 4',
  color: 'A1'
}, {
  value: 50,
  label: 'Data point 5',
  color: 'A1'
}, {
  value: 30,
  label: 'Data point 6',
  color: 'A1'
}, {
  value: 50,
  label: 'Data point 7',
  color: 'A6'
}, {
  value: 65,
  label: 'Data point 8',
  color: 'A6'
}, {
  value: 80,
  label: 'Data point 9',
  color: 'A6'
}, {
  value: 55,
  label: 'Data point 10',
  color: 'A6'
}];
var fourItemScale = [{
  value: 25,
  label: '25%'
}, {
  value: 50,
  label: '50%'
}, {
  value: 75,
  label: '75%'
}, {
  value: 100,
  label: '100%'
}];
var fiveItemScale = [{
  value: 20,
  label: '20%'
}, {
  value: 40,
  label: '40%'
}, {
  value: 60,
  label: '60%'
}, {
  value: 80,
  label: '80%'
}, {
  value: 100,
  label: '100%'
}];
var tests = [{
  describe: 'data prop',
  its: [{
    it: 'no data points',
    props: {}
  }, {
    it: '3 data points',
    props: {
      data: threeDataPoints
    }
  }, {
    it: '10 data points',
    props: {
      data: tenDataPoints
    }
  }]
}, {
  describe: 'disabled prop',
  its: [{
    it: 'set to true',
    props: {
      data: threeDataPoints,
      disabled: true
    }
  }]
}, {
  describe: 'scale prop',
  its: [{
    it: 'default scale',
    props: {
      data: threeDataPoints
    }
  }, {
    it: '4 item scale',
    props: {
      data: threeDataPoints,
      scale: fourItemScale
    }
  }, {
    it: '5 item scale',
    props: {
      data: threeDataPoints,
      scale: fiveItemScale
    }
  }]
}, {
  describe: 'labelDistance property',
  its: [{
    it: 'default labelDistance',
    props: {
      data: threeDataPoints
    }
  }, {
    it: 'labelDistance = 100',
    props: {
      data: threeDataPoints,
      labelDistance: 100
    }
  }, {
    it: 'labelDistance = 200',
    props: {
      data: threeDataPoints,
      labelDistance: 200
    }
  }]
}];
(0, _storybookSnapper.visualize)(_RadarChart["default"].displayName, function () {
  tests.forEach(function (_ref) {
    var describe = _ref.describe,
      its = _ref.its;
    (0, _storybookSnapper.story)(describe, function () {
      its.map(function (_ref2) {
        var it = _ref2.it,
          props = _ref2.props;
        return (0, _storybookSnapper.snap)(it, function () {
          return /*#__PURE__*/_react["default"].createElement(_RadarChart["default"], (0, _extends2["default"])({}, commonProps, props, {
            __self: _this,
            __source: {
              fileName: _jsxFileName,
              lineNumber: 148,
              columnNumber: 24
            }
          }));
        });
      });
    });
  });
});