/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../chunks/_rollupPluginBabelHelpers","../../../../chunks/vec2","../SnappingConstraint","../snappingUtils","./SnappingCandidate","../hints/LineSnappingHint","../hints/ParallelSnappingHint"],(function(e,t,n,i,a,r,s,o){"use strict";let g=function(e){function r({coordinateHelper:t,referenceLine:a,lineStart:r,targetPoint:s,elevationInfo:o}){var g;const f=t.clone(r);return n.subtract(f,n.add(f,f,a.rightVertex.pos),a.leftVertex.pos),(g=e.call(this,t,s,new i.LineConstraint(t,r,f),o)||this)._referenceLines=[{edge:a,fadeLeft:!0,fadeRight:!0}],g}return t._inheritsLoose(r,e),r.prototype.addReferenceLine=function(e){const t={edge:e,fadeLeft:!0,fadeRight:!0};this._referenceLines.forEach((n=>{e.rightVertex.rightEdge===n.edge&&(n.fadeLeft=!1,t.fadeRight=!1),e.leftVertex.leftEdge===n.edge&&(n.fadeRight=!1,t.fadeLeft=!1)})),this._referenceLines.push(t)},t._createClass(r,[{key:"hints",get:function(){const e=this.elevationInfo;return[new s.LineSnappingHint(a.LineSegmentHintType.TARGET,this.constraint.start,this.targetPoint,e),new o.ParallelSnappingHint(this.constraint.start,this.targetPoint,e),...this._referenceLines.map((t=>new s.LineSnappingHint(a.LineSegmentHintType.REFERENCE,t.edge.leftVertex.pos,t.edge.rightVertex.pos,e,t.fadeLeft,t.fadeRight)))]}}]),r}(r.SnappingCandidate);e.ParallelLineSnappingCandidate=g,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
