"use strict";

var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");

var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/keys"));

var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));

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

var _addonA11y = require("@storybook/addon-a11y");

var _addonNotes = require("@storybook/addon-notes");

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

var _theme = _interopRequireDefault(require("./theme"));

var _exports = _interopRequireWildcard(require("./_stories"));

//addDecorator(withA11y)
(0, _react.addDecorator)(_addonKnobs.withKnobs);
(0, _react.addDecorator)(_addonNotes.withNotes);
(0, _react.addParameters)({
  options: {
    /**
     * name to display in the top left corner
     * @type {String}
     */
    name: 'Meniga UI Storybook',
    theme: _theme.default,

    /**
     * URL for name in top left corner to link to
     * @type {String}
     */
    url: '#',

    /**
     * show story component as full screen
     * @type {Boolean}
     */
    goFullScreen: false,

    /**
     * display left panel that shows a list of stories
     * @type {Boolean}
     */
    showStoriesPanel: true,

    /**
     * display horizontal panel that displays addon configurations
     * @type {Boolean}
     */
    showAddonPanel: true,

    /**
     * display floating search box to search through stories
     * @type {Boolean}
     */
    showSearchBox: false,

    /**
     * show horizontal addons panel as a vertical panel on the right
     * @type {Boolean}
     */
    addonPanelInRight: false,

    /**
     * sorts stories
     * @type {Boolean}
     */
    sortStoriesByKind: false,

    /**
     * regex for finding the hierarchy separator
     * @example:
     *   null - turn off hierarchy
     *   /\// - split by `/`
     *   /\./ - split by `.`
     *   /\/|\./ - split by `/` or `.`
     * @type {Regex}
     */
    hierarchySeparator: /\./,

    /**
     * sidebar tree animations
     * @type {Boolean}
     */
    sidebarAnimations: true,

    /**
     * id to select an addon panel
     * @type {String}
     */
    selectedAddonPanel: undefined // The order of addons in the "Addons Panel" is the same as you import them in 'addons.js'. The first panel will be opened by default as you run Storybook

  }
});

const req = require.context(__CWD__ + '/src', true, /\.story\.js$/);

function loadStories() {
  var _context;

  (0, _forEach.default)(_context = (0, _keys.default)(req).call(req)).call(_context, filename => {
    req(filename).default(_exports);
  });
}

(0, _react.configure)(loadStories, module);