import Svg, {Ellipse, Path} from 'react-native-svg' import {type Props, useCommonSVGProps} from '#/components/icons/common' const replyIcons = [false, true].map(restricted => Array.from({length: 4}, (_, dotCount) => { return function ReplyIcon(props: Props) { const {fill, size, style, gradient, ...rest} = useCommonSVGProps(props) return ( {gradient} {Array.from({length: dotCount}, (_, index) => ( ))} ) } }), ) /** Stable icon components for each reply count and restriction state. */ export function getReplyIcon(replyCount: number, restricted: boolean) { const dotCount = Math.min(3, Math.max(0, Math.floor(replyCount))) return replyIcons[restricted ? 1 : 0][dotCount] }