"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$isPageLoader = _ref.isPageLoader,
      isPageLoader = _ref$isPageLoader === void 0 ? undefined : _ref$isPageLoader,
      _ref$isDisplayOnLoade = _ref.isDisplayOnLoaded,
      isDisplayOnLoaded = _ref$isDisplayOnLoade === void 0 ? undefined : _ref$isDisplayOnLoade,
      _ref$asyncStatus = _ref.asyncStatus,
      asyncStatus = _ref$asyncStatus === void 0 ? undefined : _ref$asyncStatus,
      _ref$asyncStatusList = _ref.asyncStatusList,
      asyncStatusList = _ref$asyncStatusList === void 0 ? undefined : _ref$asyncStatusList,
      _ref$asyncStatusBusyL = _ref.asyncStatusBusyList,
      asyncStatusBusyList = _ref$asyncStatusBusyL === void 0 ? undefined : _ref$asyncStatusBusyL;

  return {
    isPageLoader: (0, _addonKnobs.boolean)('is page loader', isPageLoader),
    isDisplayOnLoaded: (0, _addonKnobs.boolean)('is display on loaded', isDisplayOnLoaded),
    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),
    asyncStatusBusyList: (0, _addonKnobs.select)('async status busy list', (0, _utils.asyncStates)({
      isList: true
    }), asyncStatusBusyList)
  };
};

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