'use strict';

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

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

var _ = require('../../..');

var _2 = _interopRequireDefault(_);

var _Icon = require('../../base/Icon');

var _Icon2 = _interopRequireDefault(_Icon);

var _IconKnob = require('../../base/Icon/Icon.knob.options');

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('EmergencyHeader', function () {
  var iconName = (0, _addonKnobs.select)('Icon: name', _IconKnob.svgOptions, 'alert');
  var titleText = (0, _addonKnobs.text)('title', 'The State is experiencing severe weather due to the winter storm Paula.');
  var props = {
    title: function title(_ref) {
      var linkClasses = _ref.linkClasses;
      return _react2.default.createElement(
        'a',
        { className: linkClasses, href: 'https://www.mass.gov' },
        titleText
      );
    },
    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'),
    prefix: (0, _addonKnobs.text)('prefix', 'Emergency Alerts'),
    icon: !iconName ? null : _react2.default.createElement(_Icon2.default, { name: iconName })
  };
  return _react2.default.createElement(_2.default, props);
});