+ {replyMessage && (
+
+
+ {isSender ? "YOU" : formatAddress(replyMessage.senderAddress)}
+ {(isReplyText || isReplyReply) ? (
+ {isReplyReply ? replyMessage.content.content : replyMessage.content}
+ ) : (
+ isReplyVoice ?
+
+ :
+ typeLookup[replyAttachmentExtention] === "image" ?
+
+ :
+ typeLookup[replyAttachmentExtention] === "video" ?
+
+ :
+
+
+ {replyMessage.content.filename}
+
+ )}
+
+
+
+ )
+ }
+ {
+ attachmentPreview ? (
+
+ {attachment?.mimeType === "audio/wav" ?
+
+ :
+
+ {typeLookup[attachmentExtention] === "image" ?
+
+ : typeLookup[attachmentExtention] === "video" ?
+
+ :
+
+
+ {attachment?.filename ?? "Cannot preview"}
+
+ }
+
+
+
+
+
+ }
+ {
+ if (disabled) return;
+ handleSendAttachment()
+ }}
+ />
+
+ ) : (
+ recording ? (
+
+
+ {recordingValue}
+
+ RECORDING...
+ {
+ stopRecording();
+ pause();
+ reset();
+ }} />
+
+ ) : (
+ isNewMessageLoading ?
+
+
+
+ :
+
{
+ if (disabled) return;
+ startRecording();
+ start();
+ }} />
+ )}
+ right={
+
{
+ if (disabled) return;
+ handleSendMessage()
+ }}
+ />
+ }
+ disabled={disabled}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ handleSendMessage();
+ }
+ }}
+ onChange={(e) => setMessageValue(e.target.value)}
+ />
+ )
+ )
+ }
+
+