import { useState } from 'react' import { Box, SpanBox } from '../../elements/LayoutPrimitives' import { LibraryItemNode } from '../../../lib/networking/queries/useGetLibraryItemsQuery' import { LinkedItemCardAction } from './CardTypes' import { Button } from '../../elements/Button' import { theme } from '../../tokens/stitches.config' import { DotsThree, Share } from '@phosphor-icons/react' import { CardMenu } from '../CardMenu' import { UserBasicData } from '../../../lib/networking/queries/useGetViewerQuery' import { ArchiveIcon } from '../../elements/icons/ArchiveIcon' import { NotebookIcon } from '../../elements/icons/NotebookIcon' import { TrashIcon } from '../../elements/icons/TrashIcon' import { LabelIcon } from '../../elements/icons/LabelIcon' import { UnarchiveIcon } from '../../elements/icons/UnarchiveIcon' import { BrowserIcon } from '../../elements/icons/BrowserIcon' import useLibraryItemActions from '../../../lib/hooks/useLibraryItemActions' import { MoveToInboxIcon } from '../../elements/icons/MoveToInboxIcon' type LibraryHoverActionsProps = { viewer: UserBasicData isHovered: boolean item: LibraryItemNode handleAction: (action: LinkedItemCardAction) => void } export const LibraryHoverActions = (props: LibraryHoverActionsProps) => { const [menuOpen, setMenuOpen] = useState(false) const { moveItem } = useLibraryItemActions() return ( { event.stopPropagation() }} > {props.item.folder == 'following' ? ( ) : ( )} setMenuOpen(open)} actionHandler={props.handleAction} triggerElement={ } /> ) }