from .commands.register_domain_cz import RegisterDomainCZ
from .commands.register_domain_eu import RegisterDomainEU
from .commands.register_generic_domain import RegisterGenericDomain
from .version import __version__

from .configuration import Configuration
from .requestor import Requestor


class Domainmaster(object):
    def __init__(self, configuration: Configuration):
        self._requestor = Requestor(configuration)
        self._configuration = configuration

        self._register_domain_eu = RegisterDomainEU(self._requestor, configuration)
        self._register_domain_cz = RegisterDomainCZ(self._requestor, configuration)
        self._register_generic_domain = RegisterGenericDomain(self._requestor, configuration)

    @property
    def version(self) -> str:
        return __version__

    @property
    def requestor(self) -> Requestor:
        return self._requestor

    @property
    def configuration(self) -> Configuration:
        return self._configuration

    @property
    def register_domain_eu(self) -> RegisterDomainEU:
        return self._register_domain_eu

    @property
    def register_domain_cz(self) -> RegisterDomainCZ:
        return self._register_domain_cz

    @property
    def register_generic_domain(self) -> RegisterGenericDomain:
        return self._register_generic_domain

    def __str__(self) -> str:
        return f"{self.requestor}"
