import React, { useContext } from 'react' import { StyleSheet, TextInput, View } from 'react-native' import { StyleConstants } from '@utils/styles/constants' import { ComposeContext } from '@screens/Shared/Compose' import ComposeAttachments from '@screens/Shared/Compose/Attachments' import ComposeEmojis from '@screens/Shared/Compose/Emojis' import ComposePoll from '@screens/Shared/Compose/Poll' import ComposeReply from '@screens/Shared/Compose/Reply' export interface Props { textInputRef: React.RefObject } const ComposeRootFooter: React.FC = ({ textInputRef }) => { const { composeState, composeDispatch } = useContext(ComposeContext) return ( <> {composeState.emoji.active && ( )} {(composeState.attachments.uploads.length > 0 || composeState.attachmentUploadProgress) && ( )} {composeState.poll.active && ( )} {composeState.replyToStatus && ( )} ) } const styles = StyleSheet.create({ emojis: { flex: 1 }, attachments: { flex: 1 }, poll: { flex: 1, padding: StyleConstants.Spacing.Global.PagePadding }, reply: { flex: 1, padding: StyleConstants.Spacing.Global.PagePadding } }) export default ComposeRootFooter