import { Alert, Button, Group, Modal, Stack, Text, TextInput, } from "@mantine/core"; import { IconAlertTriangle } from "@tabler/icons-react"; import { useTranslation } from "react-i18next"; import { CreateAcadeniceApiKeyResponse } from "../types/api-key.types"; import CopyTextButton from "@/components/common/copy"; interface TokenCreatedModalProps { opened: boolean; onClose: () => void; result: CreateAcadeniceApiKeyResponse | null; } export function AcadeniceTokenCreatedModal({ opened, onClose, result, }: TokenCreatedModalProps) { const { t } = useTranslation(); if (!result) return null; return ( } title={t("Important")} color="red" > {t( "This is the only time you can see this token. Copy it now — it cannot be retrieved later.", )} {t("Your new API key")} {t( "This token grants full access to your account. Treat it like a password.", )} ); }