'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var React = require('react');
var React__default = _interopDefault(React);
var PropTypes = _interopDefault(require('prop-types'));
var __chunk_1 = require('../chunk-f817ce38.js');
var __chunk_3 = require('../chunk-6d243953.js');
require('../chunk-2b268ae7.js');

var styles = (function (theme) {
  var typography = theme.typography,
      palette = theme.palette;

  return {
    action: {
      gridArea: 'action',
      justifySelf: 'center',
      alignSelf: 'center',
      cursor: 'pointer',

      fontFamily: typography.fontFamily,
      fontSize: typography.fontSize,
      fontWeight: typography.fontWeightBold,
      fontStyle: typography.fontStyle,
      fontStretch: typography.fontStretch,
      lineHeight: typography.lineHeight,
      letterSpacing: typography.letterSpacing,
      textAlign: 'right',
      color: palette.blue,
      textDecoration: 'none'
    }
  };
});

var Link = function Link(_ref) {
  var children = _ref.children,
      classes = _ref.classes,
      className = _ref.className,
      newTab = _ref.newTab,
      to = _ref.to,
      rest = __chunk_3.objectWithoutProperties(_ref, ['children', 'classes', 'className', 'newTab', 'to']);
  return React__default.createElement(
    'a',
    __chunk_3._extends({
      href: to,
      className: __chunk_1.classNames(classes.action, className),
      target: newTab ? '_blank' : '_self'
    }, rest),
    children
  );
};

Link.propTypes = {
  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
  classes: PropTypes.object,
  className: PropTypes.string,
  newTab: PropTypes.bool,
  to: PropTypes.string
};

var Link$1 = __chunk_1.withNano(styles)(Link);

module.exports = Link$1;
//# sourceMappingURL=index.js.map
