import e from"@arcgis/core/symbols/support/ElevationInfo.js";import{assertNever as t,checkArg as o}from"../utilities/checkArg.js";export var ElevationInfo;!function(t){t.toEsriApiElevationInfo=function(t){o("json",t).isNotMissing();const{mode:n,unit:r,...i}=t,a=new e(i);if(t.hasOwnProperty("mode")&&null!=t.mode&&(a.mode=ElevationMode.toEsriApiElevationMode(t.mode)),t.hasOwnProperty("unit"))switch(t.unit){case"foot":a.unit="feet";break;case"kilometer":a.unit="kilometers";break;case"meter":a.unit="meters";break;case"mile":a.unit="miles";break;case"us-foot":a.unit="us-feet";break;case"yard":a.unit="yards"}return a},t.fromEsriApiElevationInfo=function(e){o("elevationInfo",e).isNotMissing();const t=e.toJSON();if(e.hasOwnProperty("mode")&&(t.mode=ElevationMode.fromEsriApiElevationMode(e.mode)),e.hasOwnProperty("unit"))switch(e.unit){case"feet":t.unit="foot";break;case"kilometers":t.unit="kilometer";break;case"meters":t.unit="meter";break;case"miles":t.unit="mile";break;case"us-feet":t.unit="us-foot";break;case"yards":t.unit="yard"}return t}}(ElevationInfo||(ElevationInfo={}));export var ElevationMode;function n(e,o){const n=e;switch(n){case"on-the-ground":return"onTheGround";case"relative-to-ground":return"relativeToGround";case"relative-to-scene":return"relativeToScene";case"absolute-height":return"absoluteHeight";default:return t(n,o)}}function r(e,o){const n=e;switch(n){case"onTheGround":return"on-the-ground";case"relativeToGround":return"relative-to-ground";case"relativeToScene":return"relative-to-scene";case"absoluteHeight":return"absolute-height";default:return t(n,o)}}!function(e){e.fromEsriApiElevationMode=function(e){return!!r(e)?e:n(e,new Error("Unrecognized elevation mode."))},e.toEsriApiElevationMode=function(e){return!!n(e)?e:r(e,new Error("Unrecognized elevation mode."))}}(ElevationMode||(ElevationMode={}));