import type Accessor from "../../core/Accessor.js"; import type SceneView from "../../views/SceneView.js"; import type { WeatherType } from "../../views/3d/environment/types.js"; import type { WeatherState } from "./types.js"; /** @deprecated since version 4.33. Use the [Weather component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-weather/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */ export interface WeatherViewModelProperties extends Partial> {} /** * Provides the logic for the [Weather](https://developers.arcgis.com/javascript/latest/references/core/widgets/Weather/) widget. * * @deprecated since version 4.33. Use the [Weather component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-weather/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). * @since 4.23 * @see [Weather](https://developers.arcgis.com/javascript/latest/references/core/widgets/Weather/) widget - _Deprecated since 4.33. Use the [Weather component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-weather/) instead._ * @see [Sample - Weather visualization](https://developers.arcgis.com/javascript/latest/sample-code/scene-weather/) * @see [Programming patterns: Widget viewModel pattern](https://developers.arcgis.com/javascript/latest/programming-patterns/#widget-viewmodel-pattern) */ export default class WeatherViewModel extends Accessor { constructor(properties?: WeatherViewModelProperties); /** * The current state of the view model that can be used for rendering the UI of the widget. * * Value | Description * ------------|------------- * disabled | widget is being created or has no view * ready | widget is ready * error | widget is displaying an error * * @default "disabled" */ get state(): WeatherState; /** * A reference to the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/). This widget is only supported in a * [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). */ accessor view: SceneView | null | undefined; /** * Sets the weather to the specified type. * * @param type - {"sunny"|"cloudy"|"rainy"|"snowy"|"foggy"} The weather to be selected. */ setWeatherByType(type: WeatherType): void; }