/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import{hasCircularArc as s,isCurvedGeometry as i}from"../../../geometry/support/curves/curveUtils.js";import a from"../../../views/interactive/sketch/SketchOptions.js";import{whenEditorLayerView as p}from"../workflowUtils.js";import u from"./UpdateRecordWorkflowData.js";var n;let l=n=class extends u{constructor(e){super(e),this.sketchOptions=null,this.snappingManager=null}get curveResizeDisabled(){return this.hasCurves&&s(this.edits.feature?.geometry)&&!this.editorItem.supportedCurveTypes.includes("elliptic-arc")}get curveUpdatesDisabled(){return this.hasCurves&&!this.editorItem.capabilities.supportsTrueCurveUpdate}get hasCurves(){const e=this.edits.feature;return!(!e?.geometry||!i(e.geometry))}get supportsSplitFeatureWorkflow(){const e=this.edits.feature,t=this.editorItem;return!(!e?.geometry||!t)&&(!(i(e.geometry)&&!t.capabilities.supportsTrueCurveUpdate)&&t.supportsSplitFeatureWorkflow)}static async create(e){const{feature:r,snappingManager:o,viewModel:s}=e,i=e.sketchOptions??new a,{view:u}=s;if(!u)throw new t("editor:cannot-create-workflow-data","The provided EditorViewModel does not have an associated view");const l=await p(u,r.layer??r.sourceLayer);return new n({...n._makeConstructorProps(e),layerView:l,sketchOptions:i,snappingManager:o})}};e([r()],l.prototype,"curveResizeDisabled",null),e([r()],l.prototype,"curveUpdatesDisabled",null),e([r()],l.prototype,"hasCurves",null),e([r()],l.prototype,"layerView",void 0),e([r({constructOnly:!0})],l.prototype,"sketchOptions",void 0),e([r()],l.prototype,"snappingManager",void 0),e([r()],l.prototype,"supportsSplitFeatureWorkflow",null),l=n=e([o("esri.widgets.Editor.legacy.UpdateFeatureWorkflowData")],l);const c=l;export{c as default};
