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


def get_outgoing_streams(logical_plan: Dict[str, Any],
                         component_name: str) -> List[str]:
    """ Gets a list of output stream names for the supplied component in the
    supplied logical plan.

    Arguments:
        logical_plan (dict):    Logical plan dictionary returned by the Heron
                                Tracker API.
        component (str):    The name of the component whose outgoing streams
                            are to be extracted.

    Returns:
        List[str]:  A list of outgoing stream names.
    """

    # Check if this is a spout
    if logical_plan["spouts"].get(component_name):
        comp_type: str = "spouts"
    else:
        comp_type = "bolts"

    return [output_stream["stream_name"]
            for output_stream
            in logical_plan[comp_type][component_name]["outputs"]]