import React from 'react' import {StyleProp, View, ViewStyle} from 'react-native' import {AppBskyFeedDefs, ComAtprotoLabelDefs} from '@atproto/api' import {msg, Plural} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useSession} from '#/state/session' import {atoms as a} from '#/alf' import {Button, ButtonIcon, 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({ type, labels, size, style, }: { type: 'account' | 'content' labels: ComAtprotoLabelDefs.Label[] | undefined size?: ButtonSize style?: StyleProp }) { const {_} = useLingui() const {currentAccount} = useSession() const control = useLabelsOnMeDialogControl() if (!labels || !currentAccount) { return null } labels = labels.filter(l => !l.val.startsWith('!')) if (!labels.length) { return null } return ( ) } export function LabelsOnMyPost({ post, style, }: { post: AppBskyFeedDefs.PostView style?: StyleProp }) { const {currentAccount} = useSession() if (post.author.did !== currentAccount?.did) { return null } return ( ) }