import e from"@arcgis/core/views/3d/environment/CloudyWeather";import r from"@arcgis/core/views/3d/environment/FoggyWeather";import n from"@arcgis/core/views/3d/environment/RainyWeather";import t from"@arcgis/core/views/3d/environment/SnowyWeather";import o from"@arcgis/core/views/3d/environment/SunnyWeather";import{checkArg as i}from"../utilities/checkArg.js";export var Weather;!function(s){s.toEsriApiWeather=function(s){switch(i("weatherJson",s).isNotMissing(),s.type){case"cloudy":return new e(s);case"foggy":return new r(s);case"rainy":return new n(s);case"snowy":return new t(s);default:return new o(s)}},s.fromEsriApiWeather=function(i){const s={type:i.type};return(i instanceof e||i instanceof o||i instanceof n||i instanceof t)&&(s.cloudCover=i.cloudCover),(i instanceof n||i instanceof t)&&(s.precipitation=i.precipitation),i instanceof r&&(s.fogStrength=i.fogStrength),i instanceof t&&(s.snowCover=i.snowCover),s}}(Weather||(Weather={}));