from typing import (
    Any,
    List,
)

from devicemanager.interactor.dto import DeviceStatusDto
from devicemanager.interactor.get_devices import GetDevicesInteractor
from devicemanager.processor._DeviceStatusDtoProcessor import DeviceStatusDtoProcessor


class GetDevicesProcessor(DeviceStatusDtoProcessor):
    def __init__(
        self,
        get_devices_interactor,     # type: GetDevicesInteractor
    ):
        # type: (...) -> None

        super(GetDevicesProcessor, self).__init__()
        self.get_devices_interactor = get_devices_interactor

    def parse_data(
        self,           # type: GetDevicesProcessor
        data,           # type: str
        event_type,     # type: str
    ):
        # type: (...) -> None

        pass

    def call_business(
        self,   # type: GetDevicesProcessor
        _,      # type: Any
    ):
        # type: (...) -> List[DeviceStatusDto]

        return self.get_devices_interactor.get_devices()
