from core.aochat.BaseModule import BaseModule
from core.decorators import instance
from core.setting_service import SettingService
from core.setting_types import ColorSettingType
from core.igncore import IgnCore


@instance()
class ColorController(BaseModule):
    def inject(self, registry):
        self.setting_service: SettingService = registry.get_instance("setting_service")
        self.bot: IgnCore = registry.get_instance("bot")

    # noinspection LongLine
    def start(self):
        self.setting_service.register(self.module_name, "header_color", "#FFFF00", ColorSettingType(),
                                          "Color for headers")
        self.setting_service.register(self.module_name, "header2_color", "#FCA712", ColorSettingType(),
                                          "Color for sub-headers")
        self.setting_service.register(self.module_name, "highlight_color", "#00FF00", ColorSettingType(),
                                          "Color for highlight")
        self.setting_service.register(self.module_name, "notice_color", "#FF8C00", ColorSettingType(),
                                          "Color for important notices")
        self.setting_service.register(self.module_name, "neutral_color", "#E6E1A6", ColorSettingType(),
                                          "Color for neutral faction")
        self.setting_service.register(self.module_name, "omni_color", "#FA8484", ColorSettingType(),
                                          "Color for omni faction")
        self.setting_service.register(self.module_name, "clan_color", "#F79410", ColorSettingType(),
                                          "Color for clan faction")
        self.setting_service.register(self.module_name, "unknown_color", "#FF0000", ColorSettingType(),
                                          "Color for unknown faction")
        self.setting_service.register(self.module_name, "org_channel_color", "#89D2E8", ColorSettingType(),
                                          "Default org channel color")
        self.setting_service.register(self.module_name, "private_channel_color", "#89D2E8", ColorSettingType(),
                                          "Default private channel color")
        self.setting_service.register(self.module_name, "private_message_color", "#89D2E8", ColorSettingType(),
                                          "Default private message color")
        self.setting_service.register(self.module_name, "blob_color", "#FFFFFF", ColorSettingType(),
                                          "Default blob content color")
