"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;

exports.__esModule = true;
exports.Link = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _react = _interopRequireDefault(require("react"));

var _core = require("../core");

var _EventListener = _interopRequireDefault(require("../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
 */
var Link = function Link(props) {
  var href = props.href,
      title = props.title,
      src = props.src,
      children = props.children;
  return /*#__PURE__*/_react.default.createElement(_EventListener.default, (0, _extends2.default)({
    primitive: "a-link"
  }, (0, _core.toProps)(props, ['href', 'title', 'src']), {
    href: href,
    title: title,
    src: src
  }), children);
};

exports.Link = Link;