'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(_);

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

var weekday = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];

(0, _react3.storiesOf)('atoms/contact', module).addDecorator((0, _addonKnobs.withKnobs)({ escapeHTML: false })).add('OperationalHours', function () {
  var showActive = (0, _addonKnobs.boolean)('showActive', false);
  var startTime = new Date('March 15, 2002 03:00:00');
  var endTime = new Date('March 15, 2002 18:00:00');
  var hours = {
    monday: {
      status: true,
      start: new Date((0, _addonKnobs.date)('Monday starting hours', startTime)),
      end: new Date((0, _addonKnobs.date)('Monday ending hours', endTime))
    },
    tuesday: {
      status: true,
      start: new Date((0, _addonKnobs.date)('Tuesday starting hours', startTime)),
      end: new Date((0, _addonKnobs.date)('Tuesday ending hours', endTime))
    },
    wednesday: {
      status: true,
      start: new Date((0, _addonKnobs.date)('Wednesday starting hours', startTime)),
      end: new Date((0, _addonKnobs.date)('Wednesday ending hours', endTime))
    },
    thursday: {
      status: true,
      start: new Date((0, _addonKnobs.date)('Thursday starting hours', startTime)),
      end: new Date((0, _addonKnobs.date)('Thursday ending hours', endTime))
    },
    friday: {
      status: true,
      start: new Date((0, _addonKnobs.date)('Friday starting hours', startTime)),
      end: new Date((0, _addonKnobs.date)('Friday ending hours', endTime))
    },
    saturday: {
      status: true,
      start: new Date((0, _addonKnobs.date)('Saturday starting hours', startTime)),
      end: new Date((0, _addonKnobs.date)('Saturday ending hours', endTime))
    },
    sunday: {
      status: true,
      start: new Date((0, _addonKnobs.date)('Sunday starting hours', startTime)),
      end: new Date((0, _addonKnobs.date)('Sunday ending hours', endTime))
    }
  };
  var props = {
    showActive: showActive,
    hours: hours,
    listKey: 'OperationalHoursStory',
    currentDay: (0, _addonKnobs.select)('currentDay', weekday, 'friday')
  };

  return _react2.default.createElement(_2.default, props);
});