"""Utility module for visualizing the human visual gamut."""

from typing import Self

from .. import Color
from ..gamut import GamutTraversalStep
from . import std_observer as std_observer


class Illuminant:
    """
    A standard illuminant. Note that `at` accepts a nanometer wavelength whereas
    `__getitem__` accepts a zero-based index.
    """
    def label(self) -> str: ...
    def is_empty(self) -> bool: ...
    def start(self) -> int: ...
    def end(self) -> int: ...
    def len(self) -> int: ...
    def at(self, wavelength: int) -> float: ...
    def checksum(self) -> float: ...
    def __len__(self) -> int: ...
    def __getitem__(self, index: int) -> float: ...
    def __repr__(self) -> str: ...


class Observer:
    """
    A standard observer, that is, a color matching function. Note that `at`
    accepts a nanometer wavelength whereas `__getitem__` accepts a zero-based
    index.
    """
    def label(self) -> str: ...
    def is_empty(self) -> bool: ...
    def start(self) -> int: ...
    def end(self) -> int: ...
    def len(self) -> int: ...
    def at(self, wavelength: int) -> list[float]: ...
    def checksum(self) -> list[float]: ...
    def __len__(self) -> int: ...
    def __getitem__(self, index: int) -> list[float]: ...
    def __repr__(self) -> str: ...


class IlluminatedObserver:
    """
    A table of weighting factors resulting from multiplying the
    per-wavelength values of an illuminant and an observer.
    """
    def __new__(cls, illuminant: Illuminant, observer: Observer) -> Self: ...
    def label(self) -> str: ...
    def is_empty(self) -> bool: ...
    def start(self) -> int: ...
    def end(self) -> int: ...
    def len(self) -> int: ...
    def at(self, wavelength: int) -> list[float]: ...
    def minimum(self) -> list[float]: ...
    def maximum(self) -> list[float]: ...
    def checksum(self) -> list[float]: ...
    def luminosity(self) -> float: ...
    def white_point(self) -> Color: ...
    def visual_gamut(self, stride: int) -> SpectrumTraversal: ...
    def __len__(self) -> int: ...
    def __getitem__(self, index: int) -> list[float]: ...
    def __repr__(self) -> str: ...


class SpectrumTraversal:
    """An iterator over spectrum boundaries."""
    def stride(self) -> int: ...
    def line_count(self) -> int: ...
    def line_length(self) -> int: ...
    def pulse(self, start: int, width: int) -> list[float]: ...
    def pulse_color(self, start: int, width: int) -> Color: ...
    def __len__(self) -> int: ...
    def __iter__(self) -> Self: ...
    def __next__(self) -> GamutTraversalStep.MoveTo | GamutTraversalStep.LineTo: ...
    def __repr__(self) -> str: ...


CIE_ILLUMINANT_D50: Illuminant = ...
CIE_ILLUMINANT_D65: Illuminant = ...
CIE_ILLUMINANT_E: Illuminant = ...
CIE_OBSERVER_2DEG_1931: Observer = ...
CIE_OBSERVER_10DEG_1964: Observer = ...

ONE_NANOMETER: int = ...
