import { Design } from '@revenge-mod/discord/design' import { isPluginPendingReload, isPluginPendingUpdate, } from '@revenge-mod/plugins/_' import type { AnyPlugin } from '@revenge-mod/plugins/_' const { AlertModal, AlertActionButton, Text } = Design export default function PluginUninstallConfirmationAlert({ plugin, action, }: { plugin: AnyPlugin action: () => Promise }) { const reloadPending = isPluginPendingReload(plugin) || isPluginPendingUpdate(plugin) return ( {plugin.manifest.name} {' '} and all of its data will be removed. This cannot be undone. } extraContent={ reloadPending && ( This plugin is pending a reload. Uninstalling now may leave side unintended effects. ) } actions={ <> } /> ) }