import {type StyleProp, View, type ViewStyle} from 'react-native' import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react' import {Plural} from '@lingui/react/macro' import {com} from '#/lexicons' import {filterUserFacingLabels} from '#/lib/moderation' import {useSession} from '#/state/session' import {atoms as a} from '#/alf' import { Button, ButtonIcon, type ButtonSize, ButtonText, } from '#/components/Button' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' import { LabelsOnMeDialog, useLabelsOnMeDialogControl, } from '#/components/moderation/LabelsOnMeDialog' export function LabelsOnMe({ labels, size, style, }: { labels: com.atproto.label.defs.Label[] | undefined size?: ButtonSize style?: StyleProp }) { const {_} = useLingui() const {currentAccount} = useSession() const control = useLabelsOnMeDialogControl() if (!labels || !currentAccount) { return null } labels = filterUserFacingLabels(labels, currentAccount.did) if (!labels.length) { return null } return ( ) }