"use strict";

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

var _react2 = require("@storybook/react");

var _addonKnobs = require("@storybook/addon-knobs");

var _utils = require("../../storybook/utils");

var _index = require("./index");

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

var props = function props() {
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
      _ref$isAlwaysVisible = _ref.isAlwaysVisible,
      isAlwaysVisible = _ref$isAlwaysVisible === void 0 ? undefined : _ref$isAlwaysVisible,
      _ref$isStatic = _ref.isStatic,
      isStatic = _ref$isStatic === void 0 ? undefined : _ref$isStatic,
      _ref$hasOverlay = _ref.hasOverlay,
      hasOverlay = _ref$hasOverlay === void 0 ? undefined : _ref$hasOverlay,
      _ref$size = _ref.size,
      size = _ref$size === void 0 ? undefined : _ref$size,
      _ref$width = _ref.width,
      width = _ref$width === void 0 ? undefined : _ref$width,
      _ref$asyncStatus = _ref.asyncStatus,
      asyncStatus = _ref$asyncStatus === void 0 ? undefined : _ref$asyncStatus,
      _ref$asyncStatusList = _ref.asyncStatusList,
      asyncStatusList = _ref$asyncStatusList === void 0 ? undefined : _ref$asyncStatusList;

  return {
    isAlwaysVisible: (0, _addonKnobs.boolean)('is always visible', isAlwaysVisible),
    isStatic: (0, _addonKnobs.boolean)('is static', isStatic),
    hasOverlay: (0, _addonKnobs.boolean)('has overlay', hasOverlay),
    size: (0, _addonKnobs.number)('size', size),
    width: (0, _addonKnobs.number)('width', width),
    asyncStatus: (0, _addonKnobs.select)('async status', (0, _utils.asyncStates)({
      isList: false
    }), asyncStatus),
    asyncStatusList: (0, _addonKnobs.select)('async status list', (0, _utils.asyncStates)({
      isList: true
    }), asyncStatusList)
  };
};

(0, _react2.storiesOf)('Web|Loader/Spinner', module).add('default', function () {
  return _react.default.createElement(_index.SpinnerLoader, props());
});