"""Centralized type aliases for sam2_onnx."""

import numpy as np
from numpy.typing import NDArray
from PIL import Image

# Array dtypes
type Float32Array = NDArray[np.float32]
type UInt8Array = NDArray[np.uint8]
type Int64Array = NDArray[np.int64]

# Input types
type ImageInput = NDArray[np.uint8] | Image.Image

# Spatial
type HW = tuple[int, int]

# Composite return types
type DecoderOutput = tuple[Float32Array, Float32Array]
type PromptCoords = tuple[Float32Array, Float32Array]
type MaskPrediction = tuple[Float32Array, Float32Array, Float32Array]
type PreprocessResult = tuple[Float32Array, HW]
type Features = dict[str, Float32Array]
type MetadataDict = dict[str, int | float | str | None]
