'use strict';

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _react3 = require('@storybook/react');

var _addonActions = require('@storybook/addon-actions');

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

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

var _index2 = require('./index');

var _index3 = _interopRequireDefault(_index2);

var _PageFlipper = require('./PageFlipper.md');

var _PageFlipper2 = _interopRequireDefault(_PageFlipper);

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

(0, _react3.storiesOf)('organisms', module).addDecorator((0, _addonKnobs.withKnobs)({ escapeHTML: false })).add('PageFlipper', function () {
  var decorativeLinkProps = {
    href: (0, _addonKnobs.text)('PageFlipper intro, introDecorativeLink: href', '#', 'DecorativeLink'),
    info: (0, _addonKnobs.text)('PageFlipper intro, introDecorativeLink: info', 'info', 'DecorativeLink'),
    text: (0, _addonKnobs.text)('PageFlipper intro, introDecorativeLink: text', 'Some Section', 'DecorativeLink'),
    showFileIcon: (0, _addonKnobs.boolean)('PageFlipper intro, introDecorativeLink: showFileIcon', false, 'DecorativeLink')
  };
  var nextProps = {
    href: (0, _addonKnobs.text)('PageFlipper nextLink: href', '', 'Next'),
    info: (0, _addonKnobs.text)('PageFlipper nextLink: info', 'This is the next page', 'Next'),
    text: (0, _addonKnobs.text)('PageFlipper nextLink: text', 'Next Site', 'Next'),
    title: (0, _addonKnobs.text)('PageFlipper nextLink: title', 'See the Next Site', 'Next'),
    onClick: (0, _addonActions.action)('Next Clicked'),
    direction: 'right',
    label: (0, _addonKnobs.text)('PageFlipper nextLink: label', 'Next Site', 'Next')
  };
  var prevProps = {
    href: (0, _addonKnobs.text)('PageFlipper previousLink: href', '', 'Previous'),
    info: (0, _addonKnobs.text)('PageFlipper previousLink: info', 'This is the previous page', 'Previous'),
    text: (0, _addonKnobs.text)('PageFlipper previousLink: text', 'Previous Site', 'Previous'),
    title: (0, _addonKnobs.text)('PageFlipper previousLink: title', 'See the Previous Site', 'Previous'),
    onClick: (0, _addonActions.action)('Previous Clicked'),
    direction: 'left',
    label: (0, _addonKnobs.text)('PageFlipper previousLink: label', 'Previous Site', 'Previous')
  };
  var props = {
    intro: {
      label: (0, _addonKnobs.text)('PageFlipper intro: label', 'This is part of:'),
      introDecorativeLink: _react2.default.createElement(_index.DecorativeLink, decorativeLinkProps)
    },
    nextLink: _react2.default.createElement(_index.ArrowNav, nextProps),
    previousLink: _react2.default.createElement(_index.ArrowNav, prevProps)
  };
  return _react2.default.createElement(_index3.default, props);
}, { info: _PageFlipper2.default });