import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants' import { FileItem } from '@standardnotes/snjs' import { FunctionComponent } from 'preact' import { PopoverFileItemAction, PopoverFileItemActionType } from '../AttachedFilesPopover/PopoverFileItemAction' import { Icon } from '@/Components/Icon/Icon' import { Switch } from '@/Components/Switch/Switch' type Props = { closeMenu: () => void closeOnBlur: (event: { relatedTarget: EventTarget | null }) => void file: FileItem fileProtectionToggleCallback?: (isProtected: boolean) => void handleFileAction: (action: PopoverFileItemAction) => Promise isFileAttachedToNote?: boolean renameToggleCallback?: (isRenamingFile: boolean) => void shouldShowRenameOption: boolean shouldShowAttachOption: boolean } export const FileMenuOptions: FunctionComponent = ({ closeMenu, closeOnBlur, file, fileProtectionToggleCallback, handleFileAction, isFileAttachedToNote, renameToggleCallback, shouldShowRenameOption, shouldShowAttachOption, }) => { return ( <> {isFileAttachedToNote ? ( ) : shouldShowAttachOption ? ( ) : null}
{shouldShowRenameOption && ( )} ) }