import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; import { Trans } from "react-i18next"; import { useTranslation } from "react-i18next"; import ActivityIndicator from "@/components/indicators/activity-indicator"; import { useState } from "react"; type DeleteRoleDialogProps = { show: boolean; role: string; onCancel: () => void; onDelete: () => void; }; export default function DeleteRoleDialog({ show, role, onCancel, onDelete, }: DeleteRoleDialogProps) { const { t } = useTranslation("views/settings"); const [isLoading, setIsLoading] = useState(false); const handleDelete = async () => { setIsLoading(true); try { await onDelete(); } catch (error) { // Error handled in parent } finally { setIsLoading(false); } }; return ( {t("roles.dialog.deleteRole.title")} , }} />

}} > roles.dialog.deleteRole.warn

); }