from typing import Any

from ._BaseMessageProcessor import BaseUpdaterProcessor
from application.interactor import ChromeUpdaterInteractor


class ChromeUpdaterProcessor(BaseUpdaterProcessor):
    def __init__(
        self,
        interactor    # type: ChromeUpdaterInteractor
    ):
        # type: (...) -> None

        super(ChromeUpdaterProcessor, self).__init__()
        self.interactor = interactor

    def parse_data(
        self,
        data,         # type: Any
        event_type    # type: Any
    ):
        # type: (...) -> bool

        return str(data) != "noValidation"

    def call_business(
        self,
        data     # type: str
    ):
        # type: (...) -> Any

        return self.interactor.update_chrome(data)

    @staticmethod
    def _do_not_remove_this_function_bug_in_the_library():
        return ''
