from pathlib import Path
import zipfile


def show_csv_headers(zip_file: Path, csv_file: str) -> list[str]:
    """Get the headers of the given CSV file within the iDigBio zip file."""
    with zipfile.ZipFile(zip_file) as zippy:
        with zippy.open(csv_file) as in_file:
            header = in_file.readline()
    headers = [h.decode().strip() for h in sorted(header.split(b","))]
    return headers