export interface CanSubmitMessageArgs { isPending: boolean conversationDisabled: boolean pendingUploads: boolean hasFlaggedAttachments: boolean hasText: boolean hasSendableAttachments: boolean } export function canSubmitMessage({ isPending, conversationDisabled, pendingUploads, hasFlaggedAttachments, hasText, hasSendableAttachments, }: CanSubmitMessageArgs): boolean { if (isPending) return false if (conversationDisabled) return false if (pendingUploads) return false if (hasFlaggedAttachments) return false return hasText || hasSendableAttachments }