export function download(filename, contentType, data) {
    const file = new File([data], filename, { type: contentType });
    const exportUrl = URL.createObjectURL(file);

    const anchorElement = document.createElement("a");
    document.body.appendChild(anchorElement);
    anchorElement.href = exportUrl;
    anchorElement.download = filename;
    anchorElement.target = "_self";
    anchorElement.click();

    URL.revokeObjectURL(exportUrl);
    anchorElement.remove();
}