import {StyleProp, TextStyle, View, 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 {usePalette} from '#/lib/hooks/usePalette' import {atoms as a} from '#/alf' import {Text} from '../../util/text/Text' 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 pal = usePalette('default') const textColor = count > maxLength ? '#e60000' : pal.colors.text const circleColor = count > maxLength ? '#e60000' : pal.colors.link return ( {maxLength - count} {count > maxLength ? ( ) : ( )} ) }