/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as t}from"tslib";import{renderingSanitizer as e}from"../../../core/sanitizerUtils.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as r}from"../../../core/support/UpdatingHandles.js";import p from"./SingleFeatureInput.js";import{compileTextElementMarkdownToHTML as i}from"./support/textInputElementUtils.js";let a=class extends p{constructor(t){super(t),this.group=null,this.type="text",this._tempTextNoEvaluatedExpressions="",this._updatingHandles=new r}initialize(){const{rawText:t}=this;t?"markdown"===this.textFormat?this._updatingHandles.addPromise(i(t).then(t=>{this._tempTextNoEvaluatedExpressions=t})):this._tempTextNoEvaluatedExpressions=t:this._tempTextNoEvaluatedExpressions=""}get rawText(){return this.template.text}get text(){return e.sanitize(this._tempTextNoEvaluatedExpressions)}get textFormat(){return this.template.textFormat}get updating(){return this._updatingHandles.updating}};t([o()],a.prototype,"group",void 0),t([o()],a.prototype,"rawText",null),t([o()],a.prototype,"text",null),t([o()],a.prototype,"textFormat",null),t([o()],a.prototype,"type",void 0),t([o()],a.prototype,"updating",null),t([o()],a.prototype,"_tempTextNoEvaluatedExpressions",void 0),a=t([s("esri.widgets.BatchAttributeForm.inputs.TextElementInput")],a);const n=a;export{n as default};
