import { ParsedMessagePart , ParsedMessagePartType } from './parsed-message-part' ; import { NORMALIZATION_FORMAT_NGXTRANSLATE } from '../api/constants' ; /**
 * Created by martin on 05.05.2017.
 * A message part consisting of a placeholder.
 * Placeholders are numbered from 0 to n.
 */ export class ParsedMessagePartPlaceholder extends ParsedMessagePart { private _index : number ; private _disp ? : string ; constructor ( index , disp ) { super ( ParsedMessagePartType . PLACEHOLDER ) ; this . _index = index ; this . _disp = disp ; } public asDisplayString ( format ? ) { if ( format === NORMALIZATION_FORMAT_NGXTRANSLATE ) { return '{{' + this . _index + '}}' ; } return '{{' + this . _index + '}}' ; } public index ( ) { return this . _index ; } public disp ( ) { return this . _disp ; } }