import { imageExtension } from "./fileTypes.mjs";
//#region src/UI/fileViewer/utils/fileUtils.js
const handleDownloadFile = (fileUrl, fileName) => {
	const a = document.createElement("a");
	a.style.display = "none";
	a.href = fileUrl;
	a.download = fileName;
	document.body.appendChild(a);
	a.click();
	window.URL.revokeObjectURL(fileUrl);
};
const validateFilesImageType = (files = [], fileExtensionField) => {
	let type = "image";
	files.forEach((file) => {
		if (!imageExtension.includes(file?.[fileExtensionField])) {
			type = "invalid";
			return;
		}
	});
	return type;
};
//#endregion
export { handleDownloadFile, validateFilesImageType };

//# sourceMappingURL=fileUtils.mjs.map