var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();import{h}from"./index-55faf181.js";import{B as BaseField}from"./BaseField-461b6d0c.js";var fieldTypeMap=new Map;function registerField(e,t){fieldTypeMap.set(e,t)}function generateField(e,t,r,n,i,o){if(r===void 0){r=[]}if(e.render){return e.render(e,t,r,n,i,o)}if(e.customViewTag){var s=e.customViewTag;return h(s,{disabled:n,field:e,errors:r,onChange:i,onBlur:o,value:t})}var u=fieldTypeMap.get(e.type);if(u){return u(e,t,r,n,i,o)}return null}var TextField=function(e){__extends(t,e);function t(t,r,n,i,o,s,u){if(s===void 0){s=1}if(u===void 0){u=1}var p=e.call(this,t,"text")||this;p.format="raw";p.id=t;p.title=r;p.placeholder=n;p.description=i;p.inputType=o;p.lines=s;p.linesMax=u;return p}t.prototype.showPreview=function(){this.preview=true;return this};t.prototype.getDisplayValue=function(e){return e};t.prototype.setInputType=function(e){this.inputType=e;return this};t.prototype.setFormat=function(e){this.format=e;return this};t.prototype.setLines=function(e){this.lines=e;return this};t.prototype.setLinesMax=function(e){this.linesMax=e;return this};t.prototype.setAutoComplete=function(e){this.autoComplete=e;return this};return t}(BaseField);TextField.type="text";var render=function(e,t,r,n,i,o){return h("dvn-field-input-text",{disabled:n,field:e,errors:r,onChange:function(t){return i(e,t.detail)},onBlur:function(){return o(e)},value:t})};registerField("text",render);export{TextField as T,generateField as g,registerField as r};