from typing import Optional

MENU_MANAGER_AUTHENTICATED_USER = {}


def get_menu_manager_authenticated_user(
    pos_id,     # type: int
):
    # type: (...) -> Optional[str]

    if pos_id not in MENU_MANAGER_AUTHENTICATED_USER:
        return None

    return MENU_MANAGER_AUTHENTICATED_USER[pos_id]


def set_menu_manager_authenticated_user(
    pos_id,     # type: int
    user_id     # type: str
):
    # type: (...) -> None

    global MENU_MANAGER_AUTHENTICATED_USER
    MENU_MANAGER_AUTHENTICATED_USER[pos_id] = user_id


def clear_menu_manager_authenticated_user(
    pos_id,     # type: int
):
    # type: (...) -> None

    global MENU_MANAGER_AUTHENTICATED_USER

    if pos_id not in MENU_MANAGER_AUTHENTICATED_USER:
        return

    del MENU_MANAGER_AUTHENTICATED_USER[pos_id]
