import type Layer from "@arcgis/core/layers/Layer.js";
import type { BasemapLayerJson } from "./BasemapLayerJson.js";
import type { ElevationLayerJson } from "./ElevationLayerJson.js";
import type { OperationalLayerJson } from "./OperationalLayerJson.js";
import type { ColorJson } from "./SymbolJson.js";
/**
 * A layer that can appear in a web map/scene.
 */
export type LayerJson = OperationalLayerJson | BasemapLayerJson | ElevationLayerJson;
/**
 * Creates an ArcGIS JS API Layer from the given layer JSON.
 *
 * @param layerJson The JSON to convert.
 */
export declare function jsonToLayer(layerJson: LayerJson): Promise<Layer>;
/**
 * Updates an ArcGIS JS API Layer from the given layer JSON.
 *
 * @param layerJson The JSON to apply.
 * @param layer The layer to update.
 */
export declare function applyJsonToLayer(layerJson: Partial<LayerJson>, layer: Layer): Promise<void>;
/**
 * Serializes an ArcGIS JS API Layer to JSON.
 *
 * @param layer The layer to serialize.
 */
export declare function layerToJson(layer: Layer): LayerJson;
/**
 * Gets the equivalent web map/scene layer type for an ArcGIS JS API Layer.
 * Type.
 *
 * @param layer Layer to get the type of.
 */
export declare function getLayerJsonType(layer: Layer): LayerJsonType | undefined;
/**
 * Properties that are common to all operational layers and basemap layers.
 */
export interface LayerJsonBase {
    /**
     * Blend modes are used to blend layers together to create an interesting
     * effect in a layer, or even to produce what seems like a new layer.
     */
    blendMode?: "average" | "color-burn" | "color-dodge" | "color" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "invert" | "lighten" | "lighter" | "luminosity" | "minus" | "multiply" | "normal" | "overlay" | "plus" | "reflect" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "vivid-light" | "xor" | null;
    /**
     * Effect provides various filter functions to achieve different visual
     * effects similar to how image filters (photo apps) work.
     */
    effect?: EffectJson | null;
    /**
     * A unique identifying string for the layer.
     */
    id?: string | null;
    /**
     * Type of the layer.
     */
    layerType?: LayerJsonType | null;
    /**
     * A number representing the maximum scale at which the layer will be
     * visible. The number is the scale's denominator; thus, a value of 2400
     * represents a scale of 1/2,400. A value of 0 indicates that the layer will
     * be visible no matter how far you zoom in.
     */
    maxScale?: number | null;
    /**
     * A number representing the minimum scale at which the layer will be
     * visible. The number is the scale's denominator; thus, a value of 2400
     * represents a scale of 1/2,400.
     */
    minScale?: number | null;
    /**
     * The degree of transparency applied to the layer on the client side, where
     * 0 is full transparency and 1 is no transparency.
     */
    opacity?: number | null;
    /**
     * Indicates whether to allow map authors the ability to control what layers
     * should be shown in a client's legend.
     */
    showLegend?: boolean | null;
    /**
     * A user-friendly title for the layer that can be used in a table of
     * contents. If this is not included, then a title is derived from the
     * service.
     */
    title?: string | null;
    /**
     * (Deprecated, use layerType instead.) If the layer is referenced through a
     * URL, but is not an ArcGIS web service, then this parameter can be
     * supplied to denote the layer type.
     */
    type?: LegacyOperationalLayerJsonType | LegacyBasemapLayerJsonType | null;
    /**
     * Determines whether the layer is initially visible in the web map.
     */
    visibility?: boolean | null;
    /**
     * Represents time extent that will control when a layer should be visible
     * based on webmap's current time. Visibility time extent only affects the
     * layer visibility and will not filter the data.
     */
    visibilityTimeExtent?: [number | null, number | null] | null;
}
/**
 * Constants for the layerType property of service layers. This field and its
 * possible values isn't officially documented by esri, however it's used in
 * ArcGIS online web maps.
 */
export type LayerJsonType = "ArcGISAnnotationLayer" | "ArcGISFeatureLayer" | "ArcGISImageServiceLayer" | "ArcGISImageServiceVectorLayer" | "ArcGISMapServiceLayer" | "ArcGISSceneServiceLayer" | "ArcGISStreamLayer" | "ArcGISTiledElevationServiceLayer" | "ArcGISTiledImageServiceLayer" | "ArcGISTiledMapServiceLayer" | "BingMapsAerial" | "BingMapsHybrid" | "BingMapsRoad" | "BuildingSceneLayer" | "CSV" | "GeoJSON" | "GeoRSS" | "GroupLayer" | "IntegratedMeshLayer" | "KML" | "MediaLayer" | "OpenStreetMap" | "PointCloudLayer" | "RasterDataElevationLayer" | "SubtypeGroupLayer" | "VectorTileLayer" | "WebTiledLayer" | "WFS" | "WMS";
/**
 * Used in legacy "type" attribute. Deprecated.
 */
export type LegacyOperationalLayerJsonType = "CSV" | "WMS" | "KML";
/**
 * Used in legacy "type" attribute. Deprecated.
 */
export type LegacyBasemapLayerJsonType = "OpenStreetMap" | "BingMapsAerial" | "BingMapsRoad" | "BingMapsHybrid" | "WebTiledLayer";
/**
 * Effect provides various filter functions to achieve different visual effects
 * similar to how image filters (photo apps) work.
 */
export type EffectJson = ScaleDependentEffectJson[] | EffectFunctionJson[];
/**
 * An object describing the effect to apply at a scale stop.
 */
export interface ScaleDependentEffectJson {
    /**
     * The scale of the view for the effect to take place.
     */
    scale: number;
    /**
     * The effect to be applied at the corresponding scale.
     */
    value: EffectFunctionJson[];
}
/**
 * Effect functions that can be combined to build a layer effect.
 */
export type EffectFunctionJson = HueRotateEffectFunctionJson | BlurEffectFunctionJson | DropShadowEffectFunctionJson | BloomEffectFunctionJson | BrightnessEffectFunctionJson | ContrastEffectFunctionJson | GrayscaleEffectFunctionJson | InvertEffectFunctionJson | OpacityEffectFunctionJson | SaturateEffectFunctionJson | SepiaEffectFunctionJson;
/**
 * An Effect Function for the hue-rotate effect.
 */
export interface HueRotateEffectFunctionJson {
    /**
     * The relative change in hue as an angle in degree. A value of 0 leaves the
     * input unchanged. A positive hue rotation increases the hue value, while a
     * negative one decreases the hue value.
     */
    angle?: number | null;
    /**
     * Effect type.
     */
    type: "hue-rotate";
}
/**
 * An Effect Function for the blur effect.
 */
export interface BlurEffectFunctionJson {
    /**
     * The radius of the blur in points. It defines the value of the standard
     * deviation to the Gaussian function. Negative values are not allowed.
     */
    radius?: number | null;
    /**
     * Effect type.
     */
    type: "blur";
}
/**
 * An Effect Function for the drop-shadow effect.
 */
export interface DropShadowEffectFunctionJson {
    /**
     * The radius of the blur in points. It defines the value of the standard
     * deviation to the Gaussian function.
     */
    blurRadius?: number | null;
    /**
     * Color is represented as a four-element array. The four elements represent
     * values for red, green, blue, and alpha in that order. Values range from 0
     * through 255.
     */
    color?: ColorJson | null;
    /**
     * The distance of the shadow on the x-axis in points.
     */
    xoffset?: number | null;
    /**
     * The distance of the shadow on the y-axis in points.
     */
    yoffset?: number | null;
    /**
     * Effect type.
     */
    type: "drop-shadow";
}
/**
 * An Effect Function for the brightness effect.
 */
export interface BrightnessEffectFunctionJson extends GenericEffectFunctionJson {
    /**
     * Effect type.
     */
    type: "brightness";
}
/**
 * An Effect Function for the contrast effect.
 */
export interface ContrastEffectFunctionJson extends GenericEffectFunctionJson {
    /**
     * Effect type.
     */
    type: "contrast";
}
/**
 * An Effect Function for the grayscale effect.
 */
export interface GrayscaleEffectFunctionJson extends GenericEffectFunctionJson {
    /**
     * Effect type.
     */
    type: "grayscale";
}
/**
 * An Effect Function for the invert effect.
 */
export interface InvertEffectFunctionJson extends GenericEffectFunctionJson {
    /**
     * Effect type.
     */
    type: "invert";
}
/**
 * An Effect Function for the opacity effect.
 */
export interface OpacityEffectFunctionJson extends GenericEffectFunctionJson {
    /**
     * Effect type.
     */
    type: "opacity";
}
/**
 * An Effect Function for the saturate effect.
 */
export interface SaturateEffectFunctionJson extends GenericEffectFunctionJson {
    /**
     * Effect type.
     */
    type: "saturate";
}
/**
 * An Effect Function for the sepia effect.
 */
export interface SepiaEffectFunctionJson extends GenericEffectFunctionJson {
    /**
     * Effect type.
     */
    type: "sepia";
}
/**
 * An Effect Function for the bloom effect.
 */
export interface BloomEffectFunctionJson {
    /**
     * Determines the radius of the blur. Negative values are not allowed.
     * Leaves the pixels inside the radius untouched.
     */
    radius?: number | null;
    /**
     * The intensity of the bloom effect. The higher the value, the brighter the
     * glow. Negative values are not allowed.
     */
    strength?: number | null;
    /**
     * The minimum color luminosity for a pixel to bloom, where at 0 all pixels
     * bloom and 1 only the pixels with 100% luminosity colors bloom.
     */
    threshold?: number | null;
    /**
     * Effect type.
     */
    type: "bloom";
}
interface GenericEffectFunctionJson {
    /**
     * Amount of effect. A value of 0 leaves the input unchanged. Grayscale,
     * invert, sepia, and opacity effects accept a maximum amount of 1 which
     * applies the effect at 100%. Brightness, contrast, and saturate can accept
     * amount above 1. Negative values are not allowed.
     */
    amount?: number | null;
    /**
     * Effect type.
     */
    type: "brightness" | "contrast" | "grayscale" | "invert" | "opacity" | "saturate" | "sepia";
}
export {};
