import { Breadcrumbs } from "@/app/components/Breadcrumbs/Breadcrumbs";
import { InternalScreen } from "@/app/components/InternalScreen/InternalScreen";
import { SettingsInput } from "@/app/components/SettingsInput/SettingsInput";
import { useAccount } from "@/app/providers/AccountProvider/useAccount";
import { useAccountProvider } from "@/app/providers/AccountProvider/useAccountProvider";
import { usePublicKey } from "@/app/providers/AccountProvider/usePublicKey";
import { Text } from "@mantine/core";
import { modals } from "@mantine/modals";
import { useNavigate } from "react-router-dom";
export function Safety() {
const publicKey = usePublicKey();
const [account, deleteAccount] = useAccount();
const {removeAccountFromLoginDice} = useAccountProvider();
const navigate = useNavigate();
const openDeleteModal = () => {
modals.openConfirmModal({
title: 'Account delete',
centered: true,
children: (
You are attempting to delete your account. Are you sure you want to proceed? This will result in a complete loss of data.
),
withCloseButton: false,
labels: { confirm: 'Continue', cancel: "No, sorry" },
confirmProps: { color: 'red' },
onConfirm: accountDelete
});
}
const accountDelete = () => {
removeAccountFromLoginDice();
deleteAccount();
navigate("/");
}
return (
<>
This is your public key. If you haven't set a @username yet, you can ask a friend to message you using your public key.
This is your private key. For security reasons, we provide it only in an encrypted form so you can simply admire it.
If anyone asks you for this key, please do not share it.
navigate("/main/backup")}
>
Please save your seed phrase, it is necessary for future access to your conversations.
Do not share this seed phrase with anyone, otherwise, the person you share it with will gain access to your conversations.
This action cannot be undone, it will result in the complete deletion of account data from your device.
Please note, this will also delete your data on the server, such as your avatar, encrypted messages, and username.
>
)
}