import i from"@arcgis/core/webscene/InitialViewProperties";import{checkArg as n}from"../utilities/checkArg.js";import{Environment as t}from"./Environment.js";import{Viewpoint as e}from"./Viewpoint.js";export var InitialState;!function(r){r.toEsriApiInitialViewProperties=function(r){n("initialStateJson",r).isNotMissing();const o=new i;return r.hasOwnProperty("viewpoint")&&(o.viewpoint=e.toEsriApiViewpoint(r.viewpoint)),r.hasOwnProperty("environment")&&null!=r.environment&&(o.environment=t.toEsriApiEnvironment(r.environment)),o},r.fromEsriApiInitialViewProperties=function(i){return n("initialViewProperties",i).isNotMissing(),{environment:t.fromEsriApiEnvironment(i.environment),viewpoint:e.fromEsriApiViewpoint(i.viewpoint)}}}(InitialState||(InitialState={}));