/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{unique as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{getGraphicLayer as r}from"../../../graphic/graphicOriginUtils.js";class o extends t{constructor(e=!1){super("editing:fetch-feature",`Failed to fetch the full ${e?"features":"feature"} from the service.`)}}class s extends t{constructor(e){super("editing:not-enough-features",`At least ${e} ${1===e?"feature is":"features are"} required to perform this operation.`)}}class i extends t{constructor(){super("editing:invalid-argument","Key feature must be one of the features being merged")}}class n extends t{constructor(){super("editing:unsupported-workflow","Merge features workflow requires a layer with geometry type 'polygon', 'polyline', or 'multipoint' that allows deleting features and updating their geometries.")}}class u extends t{constructor(){super("editing:multiple-layers-not-supported","Features must belong to the same layer.")}}class a extends t{constructor(){super("editing:layer-required","The feature must be associated with a layer to start a split feature workflow.")}}class l extends t{constructor(e){super("editing:unsupported-in-3d",`Workflow type ${e} is not supported in 3D.`)}}class p extends t{constructor(){super("editing:unsupported-workflow","Split feature workflow requires a layer with geometry type 'polygon', 'polyline', or 'multipoint' that allows creating features and updating their geometries.")}}function f(t){if(e(t.map(e=>r(e))).length>1)throw new u}function c(e){if(!e.supportsMergeFeaturesWorkflow)throw new n}function d(e,t){if(e.length<t)throw new s(t)}function g(e){if(!e.supportsSplitFeatureWorkflow)throw new p}function w(e,t){if("3d"===e.view?.type)throw new l(t)}export{o as FetchFullFeatureError,s as InsufficientFeatureCountError,i as InvalidKeyFeatureError,n as MergeWorkflowNotSupportedError,a as MissingOriginLayerError,u as MultipleSourceLayersError,l as NotSupportedIn3DError,p as SplitWorkflowNotSupportedError,f as assertFeaturesAreFromSameLayer,c as assertMergeWorkflowCapabilities,d as assertMinimumFeatureCount,g as assertSplitWorkflowCapabilities,w as assertViewNot3D};
