"use client";
import {
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from "@kandev/ui/alert-dialog";
import { Trans, useTranslation } from "react-i18next";
export function DeleteFileDescription({ name }: { name: string }) {
return (
This will permanently delete {name}. This action cannot
be undone.
);
}
export function DeleteFolderDescription({ name, fileCount }: { name: string; fileCount: number }) {
if (fileCount > 0) {
return (
This will permanently delete {name} and{" "}
{fileCount} files inside it. This action cannot be
undone.
);
}
return (
This will permanently delete {name}. This action cannot
be undone.
);
}
export function DeleteConfirmDialog({
selectedCount,
onConfirm,
}: {
selectedCount: number;
onConfirm: () => void;
}) {
const { t } = useTranslation();
return (
{t("task:deleteItemsTitle", { count: selectedCount })}
{t("task:thisWillPermanentlyDeleteSelectedItems", { selectedCount })}
{t("common:cancel")}
{t("task:delete")}
);
}