import React from 'react'; const DeviceActionModal = ({ device, action, onClose, onConfirm }) => { if (!device || !action) return null; const getActionIcon = (name) => { switch (name) { case 'Sync': return ( ); case 'Backup': return ( ); case 'Restore': return ( ); case 'Erase': return ( ); case 'Update': return ( ); case 'Unlock': return ( ); default: return ( ); } }; const getActionTitle = (name) => { switch (name) { case 'Sync': return 'Sync Device'; case 'Backup': return 'Create Backup'; case 'Restore': return 'Restore Device'; case 'Erase': return 'Erase All Content'; case 'Update': return 'Update Software'; case 'Unlock': return 'Unlock Device'; default: return name; } }; const getActionDescription = (name) => { switch (name) { case 'Sync': return `Sync data with ${device.name} including photos, music, and contacts.`; case 'Backup': return `Create a full backup of ${device.name} with all settings and data.`; case 'Restore': return `Restore ${device.name} to factory settings. This will erase all data.`; case 'Erase': return `Erase all content and settings from ${device.name}. This cannot be undone.`; case 'Update': return `Check for and install the latest software updates for ${device.name}.`; case 'Unlock': return `Unlock ${device.name} if it's locked or requires a passcode.`; default: return `Perform ${name} operation on ${device.name}.`; } }; return (
{getActionDescription(action.name)}
Device: {device.name}
Warning: {action.name === 'Erase' ? 'This will permanently delete all data on the device. Make sure you have a backup first.' : 'This action may cause data loss. Proceed with caution.'}