import React from 'react';
import PropTypes from 'prop-types';
import { a as withNano, b as classNames } from '../chunk-566df01b.js';
import { a as classCallCheck, b as createClass, c as defineProperty, d as inherits, e as objectWithoutProperties, f as possibleConstructorReturn, g as slicedToArray, h as _typeof, i as _extends } from '../chunk-aad905a2.js';
import '../chunk-aeb80e51.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 = objectWithoutProperties(_ref, ['children', 'classes', 'className', 'newTab', 'to']);
  return React.createElement(
    'a',
    _extends({
      href: to,
      className: 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 = withNano(styles)(Link);

export default Link$1;
//# sourceMappingURL=index.js.map
