var __spreadArray=this&&this.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var i=0,s=e.length,n;i<s;i++){if(n||!(i in e)){if(!n)n=Array.prototype.slice.call(e,0,i);n[i]=e[i]}}return t.concat(n||Array.prototype.slice.call(e))};var BaseField=function(){function t(t,e){this.id=t;this.type=e}t.decode=function(e){return Object.assign(Object.create(t.prototype),e)};t.prototype.getDisplayValue=function(t){return t};t.prototype.addInterceptor=function(t,e){var r;if(!this.interceptors){this.interceptors={}}this.interceptors=Object.assign(Object.assign({},this.interceptors),(r={},r[t]=__spreadArray(__spreadArray([],this.interceptors[t]||[],true),[e],false),r));return this};t.prototype.setRequired=function(t){this.required=t;return this};t.prototype.require=function(){this.required=true;return this};t.prototype.setDisabled=function(t){this.disabled=t;return this};t.prototype.disable=function(){this.disabled=true;return this};t.prototype.hide=function(){this.visible=false;return this};t.prototype.setVisibility=function(t){this.visible=t;return this};t.prototype.setValue=function(t){this.value=t;return this};t.prototype.setErrorTitle=function(t){this.errorTitle=t;return this};return t}();export{BaseField as B};