import Dialog from './Dialog' import DialogHeader from './DialogHeader' import DialogBody from './DialogBody' import DialogFooter from './DialogFooter' import DialogActions from './DialogActions' import { Button, ButtonVariant } from '@/components/buttons' import { Icon, info } from '@/components/icons' import VotesDisplay, { GameVotes } from '@/components/common/VotesDisplay' export interface UnlockerChoiceOption { key: string title: string badge: 'recommended' | 'alternative' description: string buttonLabel: string buttonVariant: ButtonVariant onSelect: () => void /** Omit entirely for unlockers that don't have community vote data (e.g. Epic's) */ votes?: GameVotes | null } export interface UnlockerChoiceDialogProps { visible: boolean gameTitle: string | null onClose: () => void options: UnlockerChoiceOption[] } /** * Generic "choose which unlocker to install" dialog. Used for both the * Steam choice (CreamLinux vs SmokeAPI, with vote data) and the Epic choice * (ScreamAPI vs Koaloader, no votes) - they only differ in copy and options, * not in structure. */ const UnlockerChoiceDialog = ({ visible, gameTitle, onClose, options }: UnlockerChoiceDialogProps) => { return (

Choose Unlocker

Select which unlocker to install for {gameTitle}:

{options.map((option) => (

{option.title}

{option.badge === 'recommended' ? 'Recommended' : 'Alternative'}

{option.description}

{option.votes !== undefined && }
))}
You can always uninstall and try the other option if one doesn't work properly.
) } export default UnlockerChoiceDialog