'use strict';

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

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

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

var _index2 = _interopRequireDefault(_index);

var _Link = require('../Link');

var _Link2 = _interopRequireDefault(_Link);

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

/* eslint-disable react/prop-types */
(0, _react3.storiesOf)('molecules', module).addDecorator((0, _addonKnobs.withKnobs)({ escapeHTML: false })).add('EmergencyAlert', function () {
  var props = {
    theme: (0, _addonKnobs.select)('theme', {
      'c-warning (default)': 'c-warning',
      'c-primary': 'c-primary',
      'c-primary-alt': 'c-primary-alt',
      'c-error': 'c-error',
      'c-gray': 'c-gray'
    }, 'c-warning'),
    message: (0, _addonKnobs.text)('message', 'MassPort is operating with limited flights due to road closures.'),
    timeStamp: (0, _addonKnobs.text)('timeStamp', '02.15.16, 5:00 p.m'),
    link: function link(_ref) {
      var linkClasses = _ref.linkClasses,
          TextElement = _ref.TextElement;
      return _react2.default.createElement(
        _Link2.default,
        { classes: linkClasses, href: 'https://www.mass.gov' },
        _react2.default.createElement(
          TextElement,
          null,
          'Read full alert'
        )
      );
    }
  };
  return _react2.default.createElement(_index2.default, props);
}, { info: '' });