11import React from 'react' ;
22import { View } from 'react-native' ;
33import ImportedStateIndicator from '@components/ImportedStateIndicator' ;
4+ import OfflineIndicator from '@components/OfflineIndicator' ;
45import OfflineWithFeedback from '@components/OfflineWithFeedback' ;
56import useOnyx from '@hooks/useOnyx' ;
67import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
78import useThemeStyles from '@hooks/useThemeStyles' ;
89import { getReportOfflinePendingActionAndErrors } from '@libs/ReportUtils' ;
910import ONYXKEYS from '@src/ONYXKEYS' ;
11+ import AgentZeroAwareTypingIndicator from './AgentZeroAwareTypingIndicator' ;
1012import ComposerActionMenu from './ComposerActionMenu' ;
1113import ComposerBox from './ComposerBox' ;
1214import type { SuggestionsRef } from './ComposerContext' ;
1315import ComposerDropZone from './ComposerDropZone' ;
1416import ComposerEmojiPicker from './ComposerEmojiPicker' ;
17+ import ComposerExceededLength from './ComposerExceededLength' ;
1518import ComposerFooter from './ComposerFooter' ;
1619import ComposerInput from './ComposerInput' ;
1720import ComposerLocalTime from './ComposerLocalTime' ;
@@ -26,7 +29,7 @@ type ReportActionComposeProps = {
2629function ComposerInner ( { reportID} : ReportActionComposeProps ) {
2730 const styles = useThemeStyles ( ) ;
2831 // eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
29- const { isSmallScreenWidth} = useResponsiveLayout ( ) ;
32+ const { isSmallScreenWidth, shouldUseNarrowLayout } = useResponsiveLayout ( ) ;
3033 const [ report ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ reportID } ` ) ;
3134 const [ isComposerFullSize = false ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT_IS_COMPOSER_FULL_SIZE } ${ reportID } ` ) ;
3235 const { reportPendingAction : pendingAction } = getReportOfflinePendingActionAndErrors ( report ) ;
@@ -49,7 +52,11 @@ function ComposerInner({reportID}: ReportActionComposeProps) {
4952 < Composer . SendButton />
5053 </ Composer . Box >
5154 </ Composer . DropZone >
52- < Composer . Footer reportID = { reportID } />
55+ < Composer . Footer >
56+ { ! shouldUseNarrowLayout && < OfflineIndicator containerStyles = { [ styles . chatItemComposeSecondaryRow ] } /> }
57+ < Composer . TypingIndicator reportID = { reportID } />
58+ < Composer . ExceededLength />
59+ </ Composer . Footer >
5360 </ OfflineWithFeedback >
5461 { ! isSmallScreenWidth && (
5562 < View style = { [ styles . mln5 , styles . mrn5 ] } >
@@ -77,6 +84,8 @@ Composer.Input = ComposerInput;
7784Composer . EmojiPicker = ComposerEmojiPicker ;
7885Composer . SendButton = ComposerSendButton ;
7986Composer . Footer = ComposerFooter ;
87+ Composer . TypingIndicator = AgentZeroAwareTypingIndicator ;
88+ Composer . ExceededLength = ComposerExceededLength ;
8089
8190export default Composer ;
8291export type { SuggestionsRef , ComposerRef , ReportActionComposeProps } ;
0 commit comments