from clarabot_nano_common.utility.handlers import HandlerClassRegistry

from clarabot_nano.core.config.update.admin_password import UpdateAdminPassword
from clarabot_nano.core.config.update.backup_interval import UpdateBackupInterval
from clarabot_nano.core.config.update.deny_anonymous import UpdateDenyAnonymous
from clarabot_nano.core.config.update.drive import (
    UpdateDriveCreate,
    UpdateDriveDelete,
    UpdateDriveAttachRoom,
    UpdateDriveDetachRoom,
    UpdateDriveAddBackupRoom,
    UpdateDriveDelBackupRoom,
)
from clarabot_nano.core.config.update.indexed_languages import UpdateIndexedLanguages
from clarabot_nano.core.config.update.indexer_ignored_mimes import UpdateIndexerIgnoredMimes
from clarabot_nano.core.config.update.name import UpdateName
from clarabot_nano.core.config.update.require_explicit_peer_trust import UpdateRequireExplicitPeerTrust
from clarabot_nano.core.config.update.room_cleanup import CleanupDeadRoomsUpdateHandler
from clarabot_nano.core.config.update.secrets import UpdateSecrets
from clarabot_nano.core.config.update.server_process_number import UpdateServerProcessNumber
from clarabot_nano.core.config.update.verify_room_blocks import VerifyRoomBlocks

CONFIG_UPDATE_HANDLER_REGISTRY = HandlerClassRegistry(
    [
        UpdateAdminPassword,
        UpdateBackupInterval,
        UpdateDenyAnonymous,
        UpdateRequireExplicitPeerTrust,
        UpdateDriveCreate,
        UpdateDriveDelete,
        UpdateDriveAttachRoom,
        UpdateDriveDetachRoom,
        UpdateDriveAddBackupRoom,
        UpdateDriveDelBackupRoom,
        UpdateIndexedLanguages,
        UpdateIndexerIgnoredMimes,
        # TODO: other indexer configs
        UpdateName,
        UpdateSecrets,
        UpdateServerProcessNumber,
        VerifyRoomBlocks,
        # Internal?
        CleanupDeadRoomsUpdateHandler,
    ]
)
