import{assertNever as e,checkArg as t}from"../utilities/checkArg.js";import{deepClone as o}from"../utilities/object.js";export var ElevationInfo;!function(e){e.toEsriApiElevationInfo=function(e){t("json",e).isNotMissing();const n=o(e);if(e.hasOwnProperty("mode")&&null!=e.mode&&(n.mode=ElevationMode.toEsriApiElevationMode(e.mode)),e.hasOwnProperty("unit"))switch(e.unit){case"foot":n.unit="feet";break;case"kilometer":n.unit="kilometers";break;case"meter":n.unit="meters";break;case"mile":n.unit="miles";break;case"us-foot":n.unit="us-feet";break;case"yard":n.unit="yards"}return n},e.fromEsriApiElevationInfo=function(e){t("elevationInfo",e).isNotMissing();const n=o(e);if(e.hasOwnProperty("mode")&&(n.mode=ElevationMode.fromEsriApiElevationMode(e.mode)),e.hasOwnProperty("unit"))switch(e.unit){case"feet":n.unit="foot";break;case"kilometers":n.unit="kilometer";break;case"meters":n.unit="meter";break;case"miles":n.unit="mile";break;case"us-feet":n.unit="us-foot";break;case"yards":n.unit="yard"}return n}}(ElevationInfo||(ElevationInfo={}));export var ElevationMode;function n(t,o){const n=t;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 e(n,o)}}function r(t,o){const n=t;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 e(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={}));