/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as t}from"tslib";import o from"../../core/Error.js";import{property as e,subclass as r}from"../../core/accessorSupport/decorators.js";import s from"../../views/interactive/sketch/SketchOptions.js";import a from"./UpdateRecordWorkflowData.js";import{whenEditorLayerView as i}from"./workflowUtils.js";var n;let p=n=class extends a{constructor(t){super(t),this.sketchOptions=null,this.snappingManager=null}static async create(t){const{feature:e,snappingManager:r,viewModel:a}=t,p=t.sketchOptions??new s,{view:c}=a;if(!c)throw new o("editor:cannot-create-workflow-data","The provided EditorViewModel does not have an associated view");const d=await i(c,e.layer??e.sourceLayer);return new n({...n._makeConstructorProps(t),layerView:d,sketchOptions:p,snappingManager:r})}};t([e()],p.prototype,"layerView",void 0),t([e({constructOnly:!0})],p.prototype,"sketchOptions",void 0),t([e()],p.prototype,"snappingManager",void 0),p=n=t([r("esri.widgets.Editor.UpdateFeatureWorkflowData")],p);const c=p;export{c as default};
