import menuAccount from '@components/contextMenu/account' import menuShare from '@components/contextMenu/share' import menuStatus from '@components/contextMenu/status' import Icon from '@components/Icon' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import React, { useContext, useState } from 'react' import { useTranslation } from 'react-i18next' import { Platform, Pressable, View } from 'react-native' import * as DropdownMenu from 'zeego/dropdown-menu' import StatusContext from './Context' import HeaderSharedAccount from './HeaderShared/Account' import HeaderSharedApplication from './HeaderShared/Application' import HeaderSharedCreated from './HeaderShared/Created' import HeaderSharedMuted from './HeaderShared/Muted' import HeaderSharedVisibility from './HeaderShared/Visibility' const TimelineHeaderDefault: React.FC = () => { const { queryKey, rootQueryKey, status, highlighted, disableDetails, rawContent } = useContext(StatusContext) if (!status) return null const { colors } = useTheme() const { t } = useTranslation('componentContextMenu') const [openChange, setOpenChange] = useState(false) const mShare = menuShare({ visibility: status.visibility, type: 'status', url: status.url || status.uri, rawContent }) const mAccount = menuAccount({ type: 'status', openChange, account: status.account, ...(status && { status }), queryKey }) const mStatus = menuStatus({ status, queryKey, rootQueryKey }) return ( {Platform.OS !== 'android' && !disableDetails ? ( {mShare.map((mGroup, index) => ( {mGroup.map(menu => ( ))} ))} {mAccount.map((mGroup, index) => ( {mGroup.map(menu => ( ))} ))} {mStatus.map((mGroup, index) => ( {mGroup.map(menu => ( ))} ))} ) : null} ) } export default TimelineHeaderDefault