from logging import Logger

from typing import Dict

from production.box import NonComboFilterBox
from production.treebuilder import BoxConfiguration
from ._BoxBuilder import BoxBuilder


class NonComboFilterBoxBuilder(BoxBuilder):
    def __init__(
        self,                   # type: NonComboFilterBoxBuilder
        loggers,                # type: Dict[str, Logger]
    ):
        # type: (...) -> None

        super(NonComboFilterBoxBuilder, self).__init__(loggers=loggers)

    def build(
        self,       # type: NonComboFilterBoxBuilder
        config,     # type: BoxConfiguration
    ):
        # type: (...) -> NonComboFilterBox

        return NonComboFilterBox(
            name=config.name,
            sons=config.sons,
            logger=self.get_logger(config=config),
        )
