import { useT } from "@agent-native/core/client/i18n"; import { AlertDialog, type AlertDialogProps, } from "@/components/shared/AlertDialog"; type SelectableItem = { id: string; title: string }; type BulkDeleteDialogProps = Omit & { selectedItems: SelectableItem[]; entitySingular: string; entityPlural: string; }; function BulkDeleteDialogDescription({ selectedItems, entitySingular, entityPlural, }: Pick< BulkDeleteDialogProps, "selectedItems" | "entitySingular" | "entityPlural" >) { const t = useT(); const selectedCount = selectedItems.length; return (

{selectedCount === 1 ? t("dialogs.bulkDeleteDescriptionOne", { entity: entitySingular }) : t("dialogs.bulkDeleteDescriptionOther", { count: selectedCount, entity: entityPlural, })}

{selectedItems.length > 0 ? ( ) : null}
); } export function BulkDeleteDialog({ open, onOpenChange, selectedItems, entitySingular, entityPlural, pending, onConfirm, }: BulkDeleteDialogProps) { const t = useT(); return ( } onConfirm={onConfirm} /> ); }