from .commands.register_domain_eu import RegisterDomain
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 = RegisterDomain(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(self) -> RegisterDomain:
        return self._register_domain

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