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-12-20 20:18:54 +05:30
|
|
|
import { useDictionary } from "@/hooks/use-dictionary"
|
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) {
|
2025-12-20 20:18:54 +05:30
|
|
|
const dict = useDictionary()
|
|
|
|
|
|
2025-03-26 08:58:46 +00:00
|
|
|
return (
|
|
|
|
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
|
|
|
<DialogContent>
|
|
|
|
|
<DialogHeader>
|
2025-12-20 20:18:54 +05:30
|
|
|
<DialogTitle>{dict.dialogs.clearTitle}</DialogTitle>
|
2025-03-26 08:58:46 +00:00
|
|
|
<DialogDescription>
|
2025-12-20 20:18:54 +05:30
|
|
|
{dict.dialogs.clearDescription}
|
2025-03-26 08:58:46 +00:00
|
|
|
</DialogDescription>
|
|
|
|
|
</DialogHeader>
|
|
|
|
|
<DialogFooter>
|
|
|
|
|
<Button
|
|
|
|
|
variant="outline"
|
|
|
|
|
onClick={() => onOpenChange(false)}
|
|
|
|
|
>
|
2025-12-20 20:18:54 +05:30
|
|
|
{dict.common.cancel}
|
2025-03-26 08:58:46 +00:00
|
|
|
</Button>
|
|
|
|
|
<Button variant="destructive" onClick={onClear}>
|
2025-12-20 20:18:54 +05:30
|
|
|
{dict.dialogs.clearEverything}
|
2025-03-26 08:58:46 +00:00
|
|
|
</Button>
|
|
|
|
|
</DialogFooter>
|
|
|
|
|
</DialogContent>
|
|
|
|
|
</Dialog>
|
2025-12-06 12:46:40 +09:00
|
|
|
)
|
2025-03-26 08:58:46 +00:00
|
|
|
}
|