import n from"@arcgis/core/layers/support/RangeDomain";import{ArgumentOutOfRangeError as i}from"../ArgumentOutOfRangeError.js";import{checkArg as a}from"../utilities/checkArg.js";export var RangeDomain;!function(e){function s(n,e){if(a("rangeDomainJson",n).isNotMissing(),a("rangeDomainJson.type",n.type).isNotMissing().satisfies((n=>"range"===n)),a("rangeDomain",e).isNotMissing(),a("rangeDomain.type",e.type).isNotMissing().satisfies((n=>"range"===n)),2!==n.range.length)throw new i("rangeDomainJson.range","range must have a length of 2");e.name=n.name,e.minValue=n.range[0],e.maxValue=n.range[1]}e.toEsriApiRangeDomain=function(i){a("rangeDomainJson",i).isNotMissing(),a("rangeDomainJson.type",i.type).isNotMissing().satisfies((n=>"range"===n));const e=new n;return s(i,e),e},e.applyToEsriApiRangeDomain=s,e.fromEsriApiRangeDomain=function(n){return a("RangeDomain",n).isNotMissing(),a("rangeDomain.type",n.type).isNotMissing().satisfies((n=>"range"===n)),n.toJSON()}}(RangeDomain||(RangeDomain={}));