from typing import Sequence
from typing import Mapping
from typing import Any


def merge_schemas(
    schema_list: Sequence[Mapping[str, Any]],
    performer_prefix: str,
    performer_uri: str,
    library_id: str,
) -> Mapping[str, Any]:
    """Merge multiple schemas.

    Args:
        schema_list: List of SDF schemas.
        performer_prefix: Performer prefix for context.
        performer_uri: Performer URI for context.
        library_id: ID of schema collection.

    Returns:
        Data in JSON output format.
    """
    sdf = {
        "@context": [
            {performer_prefix: performer_uri},
        ],
        "sdfVersion": "1.0",
        "@id": f"{performer_prefix}:Submissions/TA1/{library_id}",
        "schemas": schema_list,
    }

    return sdf