import { type StyleProp, type TextStyle, View, type ViewStyle, } from 'react-native' // @ts-ignore no type definition -prf import ProgressCircle from 'react-native-progress/Circle' // @ts-ignore no type definition -prf import ProgressPie from 'react-native-progress/Pie' import {MAX_GRAPHEME_LENGTH} from '#/lib/constants' import {atoms as a, useTheme} from '#/alf' import {Text} from '#/components/Typography' export function CharProgress({ count, max, style, textStyle, size, }: { count: number max?: number style?: StyleProp textStyle?: StyleProp size?: number }) { const maxLength = max || MAX_GRAPHEME_LENGTH const t = useTheme() const textColor = count > maxLength ? '#e60000' : t.atoms.text.color const circleColor = count > maxLength ? '#e60000' : t.palette.primary_500 return ( {maxLength - count} {count > maxLength ? ( ) : ( )} ) }