import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import './style.css';

import { Icon } from '../../../index';

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

  var icon = props.icon ? React.createElement(Icon, { name: props.icon, svgWidth: 13.2, svgHeight: 13.2 }) : '';
  var classes = classNames((_classNames = {}, _classNames[props.classes] = props.classes, _classNames));
  return React.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: PropTypes.string,
  info: PropTypes.string,
  text: PropTypes.string,
  icon: PropTypes.string,
  classes: PropTypes.string,
  children: PropTypes.node
} : {};

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

export default Link;