"""Synchronized multi-device LibreVNA driver."""

from python_app.hardware_full.librevna_multi_device_driver.models import SweepConfiguration, SweepMeasurementResult

__all__ = [
    "MultiDeviceVnaController",
    "SweepConfiguration",
    "SweepMeasurementResult",
    "list_connected_device_serial_numbers",
]


def __getattr__(name: str):
    """Lazily import native USB pieces only when they are actually needed."""
    if name == "MultiDeviceVnaController":
        from python_app.hardware_full.librevna_multi_device_driver.controller import MultiDeviceVnaController

        return MultiDeviceVnaController
    if name == "list_connected_device_serial_numbers":
        from python_app.hardware_full.librevna_multi_device_driver.transport import list_connected_device_serial_numbers

        return list_connected_device_serial_numbers
    raise AttributeError(name)
