'use strict';

exports.__esModule = true;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

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

var getLink = function getLink() {
  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Sample Link';

  var linkProps = {
    text: text,
    href: 'http://www.mass.gov/'
  };
  return _react2.default.createElement(_index.Link, linkProps);
};

var getDecorativeLink = function getDecorativeLink() {
  var props = {
    info: 'Title info here',
    text: 'Lorem ipsum dolor sit amet',
    href: '#',
    showFileIcon: false
  };
  return _react2.default.createElement(_index.DecorativeLink, props);
};

var getContactGroupItems = function getContactGroupItems() {
  var items = [];
  var types = ['phone', 'online', 'email', 'address'];
  for (var i = 0; i < 5; i += 1) {
    // ContactGroup items array.
    var primaryItem = {
      type: types[i],
      label: 'Primary Info Label ' + i + ':',
      address: '123 Imaginary Lane',
      link: { href: 'http://www.mass.gov/', text: 'PrimaryInfo Item Link ' + i },
      details: 'Primary Info details ' + i
    };
    items.push(primaryItem);
  }
  return items;
};

var getContactGroup = function getContactGroup() {
  var props = {
    icon: 'SvgMarker',
    name: 'Address',
    text: 'Sample Contact Group',
    level: 1,
    items: getContactGroupItems()
  };
  return _react2.default.createElement(_index.ContactGroup, props);
};

var getIcon = function getIcon(name) {
  var props = {
    name: name,
    svgWidth: 13,
    svgHeight: 13,
    title: 'Icon Title Here',
    classes: ['ma__general-teaser__secondaryicon']
  };
  return _react2.default.createElement(_index.Icon, props);
};

var getIconLink = function getIconLink() {
  var props = {
    link: getLink(),
    icon: getIcon('phone')
  };
  return _react2.default.createElement(_index.IconLink, props);
};

var getOperationalHours = function getOperationalHours() {
  var start = new Date('March 15, 2002 03:00:00');
  var end = new Date('March 15, 2002 18:00:00');
  var hours = {
    monday: {
      status: true,
      start: start,
      end: end
    },
    tuesday: {
      status: true,
      start: start,
      end: end
    },
    wednesday: {
      status: true,
      start: start,
      end: end
    },
    thursday: {
      status: true,
      start: start,
      end: end
    },
    friday: {
      status: true,
      start: start,
      end: end
    },
    saturday: {
      status: true,
      start: start,
      end: end
    },
    sunday: {
      status: true,
      start: start,
      end: end
    }
  };
  var props = {
    hours: hours,
    listKey: 'demo',
    currentDay: 'friday'
  };
  return _react2.default.createElement(_index.OperationalHours, props);
};

exports.default = {
  getLink: getLink,
  getDecorativeLink: getDecorativeLink,
  getContactGroup: getContactGroup,
  getIcon: getIcon,
  getIconLink: getIconLink,
  getOperationalHours: getOperationalHours,
  leftSideProps: function leftSideProps() {
    var left = [];
    for (var i = 0; i < 3; i += 1) {
      left.push(getLink());
    }
    left.push(getContactGroup());
    return left;
  },
  rightSideProps: function rightSideProps() {
    var right = [];
    right.push(getDecorativeLink());
    right.push(getIconLink());
    right.push(getOperationalHours());
    return right;
  }
};
module.exports = exports['default'];