import React from 'react' import { Button, Menu, MenuItem } from '@mui/material' import PopupState, { bindTrigger, bindMenu } from 'material-ui-popup-state' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faCheck, faLock, faTriangleExclamation } from '@fortawesome/free-solid-svg-icons' import { CurrentUserFile } from '../../types/file.ts' import styles from './style.module.scss' interface FileListProps { files: CurrentUserFile[] currentFile: CurrentUserFile setCurrentFile: (file: CurrentUserFile) => void handleExport?: () => void handleEncryptedExport?: () => void } const FileList = ({ files, currentFile, setCurrentFile, handleExport, handleEncryptedExport }: FileListProps) => { const isActive = (file: CurrentUserFile) => file.id === currentFile.id return (
{(typeof handleExport === 'function' || typeof handleEncryptedExport === 'function') && ( {(popupState) => ( {typeof handleEncryptedExport === 'function' && ( { popupState.close handleEncryptedExport() }} >   ENCRYPTED )} {typeof handleExport === 'function' && ( { popupState.close handleExport() }} >   UNENCRYPTED )} )} )}
) } export default FileList