"""Protocols for ODB objects used in FABulous."""

# ruff: noqa: D102

from typing import Any, Protocol


class OdbReaderLike(Protocol):
    """Protocol describing the reader object provided by the click wrapper."""

    dbunits: float
    tech: Any
    block: Any
    name: str


class odbBTermLike(Protocol):
    """Protocol describing the odb.dbBTerm object."""

    def getName(self) -> str: ...
    def getBPins(self) -> list[Any]: ...


class odbPointLike(Protocol):
    """Protocol describing the odb.dbPoint object."""

    def x(self) -> int: ...
    def y(self) -> int: ...


class odbRectLike(Protocol):
    """Protocol describing the odb.dbRect object."""

    def xMin(self) -> int: ...
    def yMin(self) -> int: ...
    def xMax(self) -> int: ...
    def yMax(self) -> int: ...
    def dx(self) -> int: ...
    def dy(self) -> int: ...
    def xCenter(self) -> int: ...
    def yCenter(self) -> int: ...
    def ll(self) -> odbPointLike: ...
    def ul(self) -> odbPointLike: ...
    def ur(self) -> odbPointLike: ...
    def lr(self) -> odbPointLike: ...
    def center(self) -> odbPointLike: ...
