import defaultValue from"../../Core/defaultValue.js";import JulianDate from"../../Core/JulianDate.js";function TimelineHighlightRange(t,e,i){this._color=t,this._height=e,this._base=defaultValue(i,0)}TimelineHighlightRange.prototype.getHeight=function(){return this._height},TimelineHighlightRange.prototype.getBase=function(){return this._base},TimelineHighlightRange.prototype.getStartTime=function(){return this._start},TimelineHighlightRange.prototype.getStopTime=function(){return this._stop},TimelineHighlightRange.prototype.setRange=function(t,e){this._start=t,this._stop=e},TimelineHighlightRange.prototype.render=function(t){let e="";if(this._start&&this._stop&&this._color){const i=JulianDate.secondsDifference(this._start,t.epochJulian);let n=Math.round(t.timeBarWidth*t.getAlpha(i));const h=JulianDate.secondsDifference(this._stop,t.epochJulian);let o=Math.round(t.timeBarWidth*t.getAlpha(h))-n;n<0&&(o+=n,n=0),n+o>t.timeBarWidth&&(o=t.timeBarWidth-n),o>0&&(e=``)}return e};export default TimelineHighlightRange;