from typing import List
from typing import Dict


def track_path_to_header(
    book_id: int, book_url: str, book_title: str, gpx_name: str
) -> List[Dict]:
    """
    Format the header breadcrumbs - refer to templates/layout.html.

    Args:
        book_id (int): Book ID based on the 'shelf' database table.
        book_url (str): Book URL based on the 'shelf' database table.
        book_title (str): Book title based on the 'shelf' database table.
        gpx_name (str): Name of the GPX file in the /tracks directory WITHOUT file extension.

    Returns:
        List of dicts.
    """
    return [
        {"title": "Stories", "url": "/stories"},
        {
            "title": book_title,
            "url": "/stories/" + str(book_id) + "/" + book_url,
        },
        {
            "title": gpx_name.replace("_", " ")
            # no URL because it is the current one
        },
    ]