import * as AlertDialog from '@radix-ui/react-alert-dialog' import { AlertTriangle } from 'lucide-react' import { Button } from '@/components/ui/button' interface Props { isOpen: boolean onOpenChange: (open: boolean) => void onConfirm: () => void titulo?: string descripcion?: string } export const AlertaConflicto = ({ isOpen, onOpenChange, onConfirm, titulo, descripcion, }: Props) => { // Intentamos parsear el mensaje si viene como JSON para la lista de materias let contenido try { const data = JSON.parse(descripcion as any) contenido = (

{data.main}

{data.materias.map((m: string, i: number) => ( {m} ))}

¿Deseas ignorar la regla y moverla de todos modos (Esto eliminará la seriación)?

) } catch { contenido =

{descripcion}

} return (
{titulo}
{contenido}
{/* Radix automáticamente llamará a onOpenChange(false) al hacer clic aquí */}
) }