/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as t}from"tslib";import{property as e,subclass as r}from"../../core/accessorSupport/decorators.js";import{getEffectiveLayerCapabilities as s}from"../../layers/support/layerUtils.js";import o from"./InputBase.js";import{capabilitiesAllowEditType as l}from"../support/forms/formUtils.js";let i=class extends o{constructor(t){super(t),this.editType="NA",this.editableExpressionExecutor=null}get editable(){return!!this.layerAllowsEdits&&(this.evaluatedEditableExpression??!0)}get evaluatedEditableExpression(){const{editableExpressionExecutor:t}=this;return null!=t?!!t.lastEvaluatedValue:null}get layerAllowsEdits(){const{layer:t}=this;if(!t)return!1;const e=s(t),r=e?.operations.supportsEditing,o=l(e,this.editType);return!(!r||!o)}};t([e()],i.prototype,"editType",void 0),t([e()],i.prototype,"editable",null),t([e()],i.prototype,"editableExpressionExecutor",void 0),t([e()],i.prototype,"evaluatedEditableExpression",null),t([e()],i.prototype,"layerAllowsEdits",null),i=t([r("esri.widgets.FeatureForm.EditableInput")],i);const p=i;export{p as default};
