'use client'; import { Users } from 'lucide-react'; import { VisuallyHidden } from 'radix-ui'; import { AlertDialog, AlertDialogAction, AlertDialogContent, AlertDialogFooter, AlertDialogTitle, } from '@/components/ui/alert-dialog'; import { useI18n } from '@/lib/hooks/use-i18n'; interface MultiTabEditConflictPromptProps { readonly open: boolean; readonly onDismiss: () => void; readonly onOpenChange?: (open: boolean) => void; } /** * Standalone refusal dialog the slide-surface PR will mount when * `tryAcquireEditLock` returns false on Pro-toggle entry. Pure * presenter — wiring (calling `tryAcquireEditLock` / `refreshEditLock` * / `releaseEditLock` against the current course id, generating a * tabId, etc.) lives in the slide surface's edit-entry effect. * * Single dismissive action only — the user has no remediation here * besides closing the other tab; this dialog just makes the refusal * visible instead of silently dropping the click. */ export function MultiTabEditConflictPrompt({ open, onDismiss, onOpenChange, }: MultiTabEditConflictPromptProps) { const { t } = useI18n(); return ( {t('edit.multiTab.conflict.title')}

{t('edit.multiTab.conflict.title')}

{t('edit.multiTab.conflict.body')}

{t('edit.multiTab.conflict.actionDismiss')} ); }