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 {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' import {type app, type com} from '#/lexicons' export function LabelsOnMe({ type = 'account', labels, size, style, }: { type?: 'account' | 'content' 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 ( ) } export function LabelsOnMyPost({ post, style, }: { post: app.bsky.feed.defs.PostView style?: StyleProp }) { const {currentAccount} = useSession() if (post.author.did !== currentAccount?.did) { return null } return ( ) }