import React from 'react' import { Dialog, DialogHeader, DialogBody, DialogFooter, DialogActions, } from '@/components/dialogs' import { Button } from '@/components/buttons' import { Icon, warning, info } from '@/components/icons' export interface Conflict { gameId: string gameTitle: string type: 'cream-to-proton' | 'smoke-to-native' } export interface ConflictDialogProps { visible: boolean conflicts: Conflict[] onResolve: (gameId: string, conflictType: 'cream-to-proton' | 'smoke-to-native') => void onClose: () => void } /** * Conflict Dialog component * Shows all conflicts at once with individual resolve buttons */ const ConflictDialog: React.FC = ({ visible, conflicts, onResolve, onClose, }) => { // Check if any CreamLinux conflicts exist const hasCreamConflicts = conflicts.some((c) => c.type === 'cream-to-proton') const getConflictDescription = (type: 'cream-to-proton' | 'smoke-to-native') => { if (type === 'cream-to-proton') { return 'Will remove existing unlocker files and restore the game to a clean state.' } else { return 'Will remove existing unlocker files and restore the game to a clean state.' } } return (

Unlocker conflicts detected

Some games have conflicting unlocker states that need attention.

{conflicts.map((conflict) => (

{conflict.gameTitle}

{getConflictDescription(conflict.type)}

))}
{hasCreamConflicts && (
Remember to remove sh ./cream.sh %command% from Steam launch options after resolving CreamLinux conflicts.
)}
) } export default ConflictDialog