import { ParsedMessagePart , ParsedMessagePartType } from './parsed-message-part' ; /**
 * Created by martin on 14.06.2017.
 * A message part consisting of an empty tag like <br/>.
 */ export class ParsedMessagePartEmptyTag extends ParsedMessagePart { private _tagname : string ; private _idcounter : number ; constructor ( tagname , idcounter ) { super ( ParsedMessagePartType . EMPTY_TAG ) ; this . _tagname = tagname ; this . _idcounter = idcounter ; } public asDisplayString ( format ? ) { if ( this . _idcounter === 0 ) { return '<' + this . _tagname + '>' ; } else { return '<' + this . _tagname + ' id="' + this . _idcounter . toString ( ) + '">' ; } } public tagName ( ) { return this . _tagname ; } public idCounter ( ) { return this . _idcounter ; } }