'use client' import React from 'react' import { motion, AnimatePresence } from 'framer-motion' import { Info, Image } from '@phosphor-icons/react' interface ContextMenuProps { isOpen: boolean position: { x: number; y: number } onClose: () => void onAction: (action: string) => void } export function ContextMenu({ isOpen, position, onClose, onAction }: ContextMenuProps) { const menuItems = [ { id: 'change-wallpaper', label: 'Change Background', icon: Image }, { id: 'get-info', label: 'Get Info', icon: Info }, ] const handleAction = (actionId: string) => { onAction(actionId) onClose() } return ( {isOpen && ( <> {/* Invisible backdrop to detect outside clicks */}
{/* Context Menu */} {menuItems.map((item) => { const Icon = item.icon return ( ) })} )} ) }