from typing import Optional

from application.model import Configurations
from application.service import BenefitService


class OnTableOpenInteractor(object):
    def __init__(self, configs, benefit_service):
        # type: (Configurations, BenefitService) -> None

        self.configs = configs
        self.logger = configs.logger
        self.benefit_service = benefit_service

    def execute(
            self,
            pos_id,     # type: int
            table_id    # type: str
    ):
        # type: (...) -> Optional[str]

        return self.benefit_service.apply_automatic_benefits_on_table(pos_id, table_id)
