import TFPComponentRender from '../render.js'

export default class TextRender extends TFPComponentRender {
  
  constructor(__tfp, _dataModel, _level) {
  	super(__tfp, _dataModel, _level);
  }

  getAttrHtml() {
    var attrHtml = super.getAttrHtml();
    attrHtml += " type=\"text\"";
    if(this._tfp.isDesigning && attrHtml.indexOf("readonly")<0) 
      attrHtml += " readonly";
    return attrHtml;
  }

  getHtml(getComponentsHtml, parentIndent, retainStyleAttr) {
    return super.getHtml("input", false, parentIndent, retainStyleAttr);
  }
}