import {
StyledArrowIcon,
StyledCount,
StyledDivInfoContainer,
StyledDivPercentageContainer,
StyledLink,
StyledParagraphEmphasizedText,
StyledParagraphSubtitle,
StyledSpanLinkText,
} from './ProjectInfo.styles';
import PercentageCircle from 'component/common/PercentageCircle/PercentageCircle';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { Box, styled, Typography } from '@mui/material';
interface IHealthWidgetProps {
projectId: string;
health: number;
total?: number;
stale?: number;
}
const StyledWarning = styled('span')<{ active?: boolean }>(
({ theme, active }) => ({
color: active ? theme.palette.warning.dark : 'inherit',
})
);
export const HealthWidget = ({
projectId,
health,
total,
stale,
}: IHealthWidgetProps) => {
const { uiConfig } = useUiConfig();
if (uiConfig?.flags?.newProjectOverview) {
return (
Project health
{health}%
{total} toggles in total
{stale}
{' '}
potentially stale
View project health
);
}
return (
Overall health rating
{health}%
view more
);
};