from typing import List
from typing import Dict
from typing import Any


def prepare_queue_details_get_output(records: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
    """
    Prepares context output for queue_details_get command.

    :param records: List containing dictionaries of queue records.
    :return: prepared context output list.
    """
    return [{'Id': record.get('QueueId', '') if record.get('QueueId', '') else record.get('Id', ''),
             'Name': record.get('Queue', {}).get('Name', '') if record.get('Queue', {}) else record.get('Name', ''),
             'Email': record.get('Queue', {}).get('Email', '') if record.get('Queue', {}) else record.get('Email', '')
             } for record in records]