"""Fail-closed compatibility shim for retired direct DepthAI access.

The historical module opened an arbitrary OAK device, loaded an unpinned
YOLOv5 model from a relative path, and returned camera data outside AINA's
role-bound dual-camera, Petri-registry, and manual-review contracts.  The old
symbols remain importable for compatibility, but every entry point rejects the
operation before importing camera/ML libraries or touching hardware, files,
threads, the network, or ``sys.path``.

Supported camera acquisition lives in :mod:`main.vision.cameras`; reviewed
Petri observations and artifacts live in :mod:`main.petri_workflow`.
"""

from __future__ import annotations

LEGACY_DEPTHAI_INTERACTION_DISABLED_MESSAGE = (
    "Legacy direct DepthAI/Petri access is unavailable: use the role-bound "
    "AINA camera and reviewed Petri workflow contracts"
)


class LegacyDepthAIInteractionDisabledError(RuntimeError):
    """Raised for every entry point of the retired direct-camera helper."""


def _disabled(*_args, **_kwargs):
    raise LegacyDepthAIInteractionDisabledError(
        LEGACY_DEPTHAI_INTERACTION_DISABLED_MESSAGE
    )


def _encode_crop(*args, **kwargs):
    _disabled(*args, **kwargs)


def detect_petri_dishes(*args, **kwargs):
    _disabled(*args, **kwargs)


def _circle_edge_confidence(*args, **kwargs):
    _disabled(*args, **kwargs)


def detect_single_dots(*args, **kwargs):
    _disabled(*args, **kwargs)


def assign_dots_to_dishes(*args, **kwargs):
    _disabled(*args, **kwargs)


def find_petri_dish_centers_1(*args, **kwargs):
    _disabled(*args, **kwargs)


def find_petri_dish_centers(*args, **kwargs):
    _disabled(*args, **kwargs)


def capture_image(*args, **kwargs):
    _disabled(*args, **kwargs)


def capture_and_return_base64image(*args, **kwargs):
    _disabled(*args, **kwargs)


def orientation_and_capture_for_navigation(*args, **kwargs):
    _disabled(*args, **kwargs)
