import type CIMSymbol from "./CIMSymbol.js";
import type ExtrudeSymbol3DLayer from "./ExtrudeSymbol3DLayer.js";
import type FillSymbol3DLayer from "./FillSymbol3DLayer.js";
import type IconSymbol3DLayer from "./IconSymbol3DLayer.js";
import type LabelSymbol3D from "./LabelSymbol3D.js";
import type LineSymbol3D from "./LineSymbol3D.js";
import type LineSymbol3DLayer from "./LineSymbol3DLayer.js";
import type MeshSymbol3D from "./MeshSymbol3D.js";
import type ObjectSymbol3DLayer from "./ObjectSymbol3DLayer.js";
import type PathSymbol3DLayer from "./PathSymbol3DLayer.js";
import type PictureFillSymbol from "./PictureFillSymbol.js";
import type PictureMarkerSymbol from "./PictureMarkerSymbol.js";
import type PointSymbol3D from "./PointSymbol3D.js";
import type PolygonSymbol3D from "./PolygonSymbol3D.js";
import type SimpleFillSymbol from "./SimpleFillSymbol.js";
import type SimpleLineSymbol from "./SimpleLineSymbol.js";
import type SimpleMarkerSymbol from "./SimpleMarkerSymbol.js";
import type TextSymbol from "./TextSymbol.js";
import type TextSymbol3DLayer from "./TextSymbol3DLayer.js";
import type WaterSymbol3DLayer from "./WaterSymbol3DLayer.js";
import type WebStyleSymbol from "./WebStyleSymbol.js";
import type { CIMSymbolProperties } from "./CIMSymbol.js";
import type { LabelSymbol3DProperties } from "./LabelSymbol3D.js";
import type { LineSymbol3DProperties } from "./LineSymbol3D.js";
import type { MeshSymbol3DProperties } from "./MeshSymbol3D.js";
import type { PictureFillSymbolProperties } from "./PictureFillSymbol.js";
import type { PictureMarkerSymbolProperties } from "./PictureMarkerSymbol.js";
import type { PointSymbol3DProperties } from "./PointSymbol3D.js";
import type { PolygonSymbol3DProperties } from "./PolygonSymbol3D.js";
import type { SimpleFillSymbolProperties } from "./SimpleFillSymbol.js";
import type { SimpleLineSymbolProperties } from "./SimpleLineSymbol.js";
import type { SimpleMarkerSymbolProperties } from "./SimpleMarkerSymbol.js";
import type { TextSymbolProperties } from "./TextSymbol.js";
import type { WebStyleSymbolProperties } from "./WebStyleSymbol.js";

export type LineStyle = "dash" | "dash-dot" | "dot" | "long-dash" | "long-dash-dot" | "long-dash-dot-dot" | "none" | "short-dash" | "short-dash-dot" | "short-dash-dot-dot" | "short-dot" | "solid";

export type LineCap = "square" | "round" | "butt";

export type LineJoin = "miter" | "bevel" | "round";

export type LineMarkerPlacement = "begin" | "end" | "begin-end";

export type LineMarkerStyle = "arrow" | "circle" | "square" | "diamond" | "cross" | "x";

export type FillStyle = "backward-diagonal" | "cross" | "diagonal-cross" | "forward-diagonal" | "horizontal" | "none" | "solid" | "vertical";

export type PathSymbol3DLayerProfile = "circle" | "quad";

export type PathSymbol3DLayerJoin = LineJoin;

export type PathSymbol3DLayerCap = LineCap | "none";

export type PathSymbol3DLayerAnchor = "center" | "bottom" | "top";

export type PathSymbol3DLayerProfileRotation = "heading" | "all";

export type SimpleLineSymbolCap = "butt" | "round" | "square";

export type SimpleLineSymbolJoin = "miter" | "round" | "bevel";

export type IconSymbol3DLayerAnchor = "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "relative";

export type IconSymbol3DLayerPrimitive = "x" | "circle" | "square" | "cross" | "triangle" | "kite";

export type ObjectSymbol3DLayerAnchor = "center" | "top" | "bottom" | "origin" | "relative";

export type ObjectSymbol3DLayerPrimitiveType = "sphere" | "cylinder" | "cube" | "cone" | "inverted-cone" | "diamond" | "tetrahedron";

export type WaterBodySize = "small" | "medium" | "large";

export type WaveStrength = "calm" | "rippled" | "slight" | "moderate";

export type FontDecoration = "none" | "underline" | "line-through";

export type FontStyle = "normal" | "italic" | "oblique";

export type FontWeight = "normal" | "lighter" | "bold" | "bolder";

export type TextHorizontalAlignment = "left" | "right" | "center";

export type TextVerticalAlignment = "baseline" | "top" | "middle" | "bottom";

/** Union of all 3D symbol layers. */
export type Symbol3DLayerUnion = ExtrudeSymbol3DLayer | FillSymbol3DLayer | IconSymbol3DLayer | LineSymbol3DLayer | ObjectSymbol3DLayer | PathSymbol3DLayer | TextSymbol3DLayer | WaterSymbol3DLayer;

export type Symbol3DLayerType = Symbol3DLayerUnion["type"];

/** Union of all 2D fill symbols. */
export type FillSymbolUnion = PictureFillSymbol | SimpleFillSymbol;

/** Union of all 2D marker symbols. */
export type MarkerSymbolUnion = PictureMarkerSymbol | SimpleMarkerSymbol;

/** Union of all 2D symbols. */
export type Symbol2DUnion = PictureFillSymbol | PictureMarkerSymbol | SimpleFillSymbol | SimpleLineSymbol | SimpleMarkerSymbol | TextSymbol | CIMSymbol;

export type Symbol2DUnionProperties = (PictureFillSymbolProperties & {
    type: "picture-fill";
}) | (PictureMarkerSymbolProperties & {
    type: "picture-marker";
}) | (SimpleFillSymbolProperties & {
    type: "simple-fill";
}) | (SimpleLineSymbolProperties & {
    type: "simple-line";
}) | (SimpleMarkerSymbolProperties & {
    type: "simple-marker";
}) | (TextSymbolProperties & {
    type: "text";
}) | (CIMSymbolProperties & {
    type: "cim";
});

/** Union of all 3D symbols. */
export type Symbol3DUnion = LabelSymbol3D | LineSymbol3D | MeshSymbol3D | PointSymbol3D | PolygonSymbol3D;

export type Symbol3DUnionProperties = (LabelSymbol3DProperties & {
    type: "label-3d";
}) | (LineSymbol3DProperties & {
    type: "line-3d";
}) | (MeshSymbol3DProperties & {
    type: "mesh-3d";
}) | (PointSymbol3DProperties & {
    type: "point-3d";
}) | (PolygonSymbol3DProperties & {
    type: "polygon-3d";
});

/** Union of all 2D and 3D symbols. */
export type Symbol2D3DUnion = Symbol2DUnion | Symbol3DUnion;

/** Union of all symbols. */
export type SymbolUnion = Symbol2DUnion | Symbol3DUnion | WebStyleSymbol;

export type SymbolType = SymbolUnion["type"];

export type SymbolUnionProperties = Symbol2DUnionProperties | Symbol3DUnionProperties | (WebStyleSymbolProperties & {
    type: "web-style";
});

export type PointSymbolUnion = PictureMarkerSymbol | SimpleMarkerSymbol | PointSymbol3D | CIMSymbol;

export type LineSymbolUnion = SimpleLineSymbol | LineSymbol3D | CIMSymbol;

export type PolygonSymbolUnion = SimpleFillSymbol | PictureFillSymbol | PolygonSymbol3D | CIMSymbol;