2025-12-06 12:46:40 +09:00
|
|
|
"use client"
|
2025-03-26 08:58:46 +00:00
|
|
|
|
2025-12-06 12:46:40 +09:00
|
|
|
import { Button } from "@/components/ui/button"
|
2025-03-26 08:58:46 +00:00
|
|
|
import {
|
|
|
|
|
Dialog,
|
|
|
|
|
DialogContent,
|
|
|
|
|
DialogDescription,
|
|
|
|
|
DialogFooter,
|
|
|
|
|
DialogHeader,
|
|
|
|
|
DialogTitle,
|
2025-12-06 12:46:40 +09:00
|
|
|
} from "@/components/ui/dialog"
|
2025-03-26 08:58:46 +00:00
|
|
|
|
|
|
|
|
interface ResetWarningModalProps {
|
2025-12-06 12:46:40 +09:00
|
|
|
open: boolean
|
|
|
|
|
onOpenChange: (open: boolean) => void
|
|
|
|
|
onClear: () => void
|
2025-03-26 08:58:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function ResetWarningModal({
|
|
|
|
|
open,
|
|
|
|
|
onOpenChange,
|
|
|
|
|
onClear,
|
|
|
|
|
}: ResetWarningModalProps) {
|
|
|
|
|
return (
|
|
|
|
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
|
|
|
<DialogContent>
|
|
|
|
|
<DialogHeader>
|
|
|
|
|
<DialogTitle>Clear Everything?</DialogTitle>
|
|
|
|
|
<DialogDescription>
|
|
|
|
|
This will clear the current conversation and reset the
|
|
|
|
|
diagram. This action cannot be undone.
|
|
|
|
|
</DialogDescription>
|
|
|
|
|
</DialogHeader>
|
|
|
|
|
<DialogFooter>
|
|
|
|
|
<Button
|
|
|
|
|
variant="outline"
|
|
|
|
|
onClick={() => onOpenChange(false)}
|
|
|
|
|
>
|
|
|
|
|
Cancel
|
|
|
|
|
</Button>
|
|
|
|
|
<Button variant="destructive" onClick={onClear}>
|
|
|
|
|
Clear Everything
|
|
|
|
|
</Button>
|
|
|
|
|
</DialogFooter>
|
|
|
|
|
</DialogContent>
|
|
|
|
|
</Dialog>
|
2025-12-06 12:46:40 +09:00
|
|
|
)
|
2025-03-26 08:58:46 +00:00
|
|
|
}
|