from enum import IntEnum

from messagebus import (
    TokenCreator,
    TokenPriority,
)

MSGGRP_TK_POS_UPDATER = "95"


def _create_token(
    number,     # type: str
):
    # type: (...) -> int

    return TokenCreator.create_token(
        priority=TokenPriority.low,
        message_group=MSGGRP_TK_POS_UPDATER,
        number=number,
    )


# noinspection SpellCheckingInspection

class PosUpdaterApiTokens(IntEnum):

    TK_POS_UPDATER_PERFORM_CATALOG_UPDATE = _create_token("1")
    TK_POS_UPDATER_PERFORM_LOADER_UPDATE = _create_token("5")
    TK_POS_UPDATER_PERFORM_BINARIES_UPDATE = _create_token("7")
    TK_POS_UPDATER_PERFORM_CHROME_UPDATE = _create_token("9")
