import React, { useEffect, useState } from 'react';
import { Box, CircularProgress, Tooltip } from '@mui/material';
import { TorIcon } from './Icons';
import { useTranslation } from 'react-i18next';
interface TorIndicatorProps {
color: 'inherit' | 'error' | 'warning' | 'success' | 'primary' | 'secondary' | 'info' | undefined;
tooltipOpen?: boolean | undefined;
title: string;
progress: boolean;
}
const TorIndicator = ({
color,
tooltipOpen = undefined,
title,
progress,
}: TorIndicatorProps): JSX.Element => {
return (
{progress ? (
<>
>
) : (
)}
);
};
interface TorConnectionBadgeProps {
torStatus: 'NOTINIT' | 'STARTING' | '"Done"' | 'DONE';
}
const TorConnectionBadge = ({ torStatus }: TorConnectionBadgeProps): JSX.Element => {
const { t } = useTranslation();
if (window?.NativeRobosats == null) {
return <>>;
}
if (torStatus === 'NOTINIT') {
return (
);
} else if (torStatus === 'STARTING') {
return (
);
} else if (torStatus === '"Done"' || torStatus === 'DONE') {
return ;
} else {
return (
);
}
};
export default TorConnectionBadge;