package labeling

import (
	

	
	
)

// PositionedArrowheadLabel is the rendered box reserved beside one end of an
// edge route.
type PositionedArrowheadLabel struct {
	geo.Box
	Edge     *layoutgraph.Edge
	IsTarget bool
	Text     string
}

// PositionArrowheadLabel derives the renderer-compatible label box for one
// arrowhead. A nil result means that endpoint has no arrowhead label.
func ( *layoutgraph.Edge,  bool,  geo.Route) *PositionedArrowheadLabel {
	if  == nil {
		return nil
	}
	 := .SourceArrowheadLabel
	if  {
		 = .TargetArrowheadLabel
	}
	if  == nil {
		return nil
	}
	 := labelgeom.ArrowheadTopLeft(
		,
		,
		string(.SourceArrowhead),
		string(.TargetArrowhead),
		.Width,
		.Height,
	)
	return &PositionedArrowheadLabel{
		Box:      *geo.NewBox(, .Width, .Height),
		Edge:     ,
		IsTarget: ,
		Text:     .Text,
	}
}