// Copyright 2017-2022 The MathJax Consortium
// SPDX-License-Identifier: Apache-2.0
// This file is a Go translation and modification of MathJax 3.2.2.

package svg

import 

// linkParent ports SVGWrapper.createSVGnode's href path.  MathJax wraps the
// node in an SVG anchor and installs a transparent hit box as the first child
// of the linked group so the entire measured box remains clickable.
func ( *wrapper) (,  *Element) *Element {
	if .node == nil || .node.Attributes == nil {
		return 
	}
	,  := .node.Attributes.Get("href")
	if ! || fmt.Sprint() == "" {
		return 
	}
	 := NewElement("a").SetAttr("href", fmt.Sprint())
	.Append()
	 := .outerBBox()
	.Append(NewElement("rect").
		SetAttr("data-hitbox", "true").
		SetAttr("fill", "none").
		SetAttr("stroke", "none").
		SetAttr("pointer-events", "all").
		SetAttr("width", fixed(.W)).
		SetAttr("height", fixed(.H+.D)).
		SetAttr("y", fixed(-.D)))
	return 
}