import logging

from application.model.configuration import (
    EndpointConfig,
)
from typing import Dict

logger = logging.getLogger(__name__)


class GetEndPointsConfigInteractor(object):
    def __init__(
        self,                   # type: GetEndPointsConfigInteractor
        endpoints_config,       # type: Dict[str, EndpointConfig]
    ):
        # type: (...) -> None

        self.endpoints_config = endpoints_config

    def get_loyalty_endpoints_config(
        self,    # type: GetEndPointsConfigInteractor
    ):
        # type: (...) -> Dict[str, bool]

        dict_endpoints_config = {}
        for key, endpoint_config in self.endpoints_config.items():
            dict_endpoints_config[key] = endpoint_config.call_external_endpoint

        return dict_endpoints_config
