import _extends from "@babel/runtime/helpers/esm/extends";
import React from 'react';
import { toProps } from '../core';
import EventListener from '../event/EventListener';

/**
 * The link primitive provides a compact API to define links that
 * resembles the traditional `<a>` tag.
 *
 * @see https://aframe.io/docs/1.3.0/primitives/a-link.html
 */
export var Link = function Link(props) {
  var href = props.href,
      title = props.title,
      src = props.src,
      children = props.children;
  return /*#__PURE__*/React.createElement(EventListener, _extends({
    primitive: "a-link"
  }, toProps(props, ['href', 'title', 'src']), {
    href: href,
    title: title,
    src: src
  }), children);
};