from typing import Tuple
import logging


async def get_current_turn(queue_array: list) -> Tuple[int, str, int]:
    """Get the person whose turn it is to do the chore in a queue.

    Returns
    -------
    Tuple[int, str, int]
        A tuple of form: (user_id, user_name, index_position)
    """
    for index, member in enumerate(queue_array):
        if member["current_turn"]:
            data: Tuple[int, str, int] = (member["user_id"], member["name"], index)
            return data

    logging.error("Current turn person not found.")
    return (0, "", 0)