"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$isInfoVariant = _ref.isInfoVariant,
      isInfoVariant = _ref$isInfoVariant === void 0 ? undefined : _ref$isInfoVariant,
      _ref$isInModal = _ref.isInModal,
      isInModal = _ref$isInModal === void 0 ? undefined : _ref$isInModal,
      _ref$isInForm = _ref.isInForm,
      isInForm = _ref$isInForm === void 0 ? undefined : _ref$isInForm,
      _ref$infoMessage = _ref.infoMessage,
      infoMessage = _ref$infoMessage === void 0 ? undefined : _ref$infoMessage,
      _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 {
    isInfoVariant: (0, _addonKnobs.boolean)('is info variant', isInfoVariant),
    isInModal: (0, _addonKnobs.boolean)('is in modal', isInModal),
    isInForm: (0, _addonKnobs.boolean)('is in form', isInForm),
    infoMessage: (0, _addonKnobs.text)('info message', infoMessage),
    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|Error', module).add('inline', function () {
  return _react.default.createElement(_index.ErrorInline, props());
});