import {type StyleProp, View, type ViewStyle} from 'react-native' import {LinearGradient} from 'expo-linear-gradient' import {Trans, useLingui} from '@lingui/react/macro' import {PressableScale} from '#/lib/custom-animations/PressableScale' import {useHaptics} from '#/lib/haptics' import {useHideBottomBarBorderForScreen} from '#/lib/hooks/useHideBottomBarBorder' import {useProfileQuery} from '#/state/queries/profile' import {useSession} from '#/state/session' import {UserAvatar} from '#/view/com/util/UserAvatar' import {atoms as a, ios, native, useBreakpoints, useTheme} from '#/alf' import {transparentifyColor} from '#/alf/util/colorGeneration' import {useInteractionState} from '#/components/hooks/useInteractionState' import {Text} from '#/components/Typography' export function ThreadComposePrompt({ onPressCompose, style, }: { onPressCompose: () => void style?: StyleProp }) { const {currentAccount} = useSession() const {data: profile} = useProfileQuery({did: currentAccount?.did}) const {t: l} = useLingui() const {gtMobile} = useBreakpoints() const t = useTheme() const haptics = useHaptics() const { state: hovered, onIn: onHoverIn, onOut: onHoverOut, } = useInteractionState() const { state: pressed, onIn: onPressIn, onOut: onPressOut, } = useInteractionState() useHideBottomBarBorderForScreen() return ( {!gtMobile && ( )} { onPressCompose() haptics.tap() }} onLongPress={ios(() => { onPressCompose() haptics.longPress() })} onHoverIn={onHoverIn} onHoverOut={onHoverOut} onPressIn={onPressIn} onPressOut={onPressOut} // tablet and up highlights on press instead of scaling targetScale={gtMobile ? 1 : undefined} style={[ a.flex_row, a.align_center, a.p_sm, a.gap_sm, a.rounded_full, (!gtMobile || hovered || pressed) && t.atoms.bg_contrast_25, !gtMobile && native([a.border, t.atoms.border_contrast_low]), a.transition_color, ]}> Write your reply ) }