/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{pushIfSome as r}from"../../../../../core/arrayUtils.js";import o from"../../../../../core/Error.js";import i from"../../../../../core/Logger.js";import{property as a,subclass as s}from"../../../../../core/accessorSupport/decorators.js";const l=()=>i.getLogger("esri.widgets.Editor.components.workflowAdapters.pendingFeatureList.SplitFeatureWorkflowPendingFeatureListAdapter");let n=class extends t{constructor(e){super(),this._workflow=e.workflow}get allowCancel(){return!1}get layer(){return this._workflow.data.editorItem?.layer}get features(){const{existingFeatureEdits:e,newFeatureEdits:t}=this._workflow.data,o=[];return r(o,e?.feature,t?.feature),o}cancelFeature(){l().error(new o("editing:cannot-cancel-feature","Cannot cancel or remove features in a SplitFeatureWorkflow"))}clearHighlights(){this._workflow.data.temporaryHighlightFeature=null}highlightFeature(e){this._workflow.data.temporaryHighlightFeature=e}getFeatureTitle(e){return this._workflow.data.getEditsForFeature(e)?.displayTitle}isSubmittable(e){return this._workflow.data.getEditsForFeature(e)?.submittable??!0}isVisible(){return!0}onSelectFeature(e){this._workflow.setActiveFeature(e)}zoomToFeature(e){this._workflow.data.viewModel.zoomTo(e)}};e([a()],n.prototype,"_workflow",void 0),n=e([s("esri.widgets.Editor.components.workflowAdapters.pendingFeatureList.SplitFeatureWorkflowPendingFeatureListAdapter")],n);export{n as SplitFeatureWorkflowPendingFeatureListAdapter};
