'use strict';

exports.__esModule = true;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

require('./style.css');

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

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

var Link = function Link(props) {
  var _classNames;

  var icon = props.icon ? _react2.default.createElement(_index.Icon, { name: props.icon, svgWidth: 13.2, svgHeight: 13.2 }) : '';
  var classes = (0, _classnames2.default)((_classNames = {}, _classNames[props.classes] = props.classes, _classNames));
  return _react2.default.createElement(
    'a',
    {
      href: props.href,
      className: classes || null,
      title: props.info
    },
    props.children ? props.children : props.text,
    '\xA0',
    icon
  );
};

Link.propTypes = process.env.NODE_ENV !== "production" ? {
  href: _propTypes2.default.string,
  info: _propTypes2.default.string,
  text: _propTypes2.default.string,
  icon: _propTypes2.default.string,
  classes: _propTypes2.default.string,
  children: _propTypes2.default.node
} : {};

Link.defaultProps = {
  href: '#',
  info: '',
  text: '',
  icon: 'arrow'
};

exports.default = Link;
module.exports = exports['default'];