
import { Range } from '../core/range.js';

var InlineDecorationType;
(function(InlineDecorationType) {
    InlineDecorationType[InlineDecorationType["Regular"] = 0] = "Regular";
    InlineDecorationType[InlineDecorationType["Before"] = 1] = "Before";
    InlineDecorationType[InlineDecorationType["After"] = 2] = "After";
    InlineDecorationType[InlineDecorationType["RegularAffectingLetterSpacing"] = 3] = "RegularAffectingLetterSpacing";
})(InlineDecorationType || (InlineDecorationType = {}));
class InlineDecoration {
    constructor(range, inlineClassName, type) {
        this.range = range;
        this.inlineClassName = inlineClassName;
        this.type = type;
    }
}
class SingleLineInlineDecoration {
    constructor(
        startOffset,
        endOffset,
        inlineClassName,
        inlineClassNameAffectsLetterSpacing
    ) {
        this.startOffset = startOffset;
        this.endOffset = endOffset;
        this.inlineClassName = inlineClassName;
        this.inlineClassNameAffectsLetterSpacing = inlineClassNameAffectsLetterSpacing;
    }
    toInlineDecoration(lineNumber) {
        return ( new InlineDecoration(( new Range(lineNumber, this.startOffset + 1, lineNumber, this.endOffset + 1)), this.inlineClassName, this.inlineClassNameAffectsLetterSpacing ? InlineDecorationType.RegularAffectingLetterSpacing : InlineDecorationType.Regular));
    }
}

export { InlineDecoration, InlineDecorationType, SingleLineInlineDecoration };
