mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-26 23:51:14 +02:00
23 lines
490 B
TypeScript
23 lines
490 B
TypeScript
export interface CanSubmitChatInput {
|
|
isLoadingMessages: boolean;
|
|
isThreadRunning: boolean;
|
|
isBlockedByOtherUser: boolean;
|
|
isComposerEmpty: boolean;
|
|
isWorkspaceChatReady: boolean;
|
|
}
|
|
|
|
export function canSubmitChat({
|
|
isLoadingMessages,
|
|
isThreadRunning,
|
|
isBlockedByOtherUser,
|
|
isComposerEmpty,
|
|
isWorkspaceChatReady,
|
|
}: CanSubmitChatInput): boolean {
|
|
return (
|
|
!isLoadingMessages &&
|
|
!isThreadRunning &&
|
|
!isBlockedByOtherUser &&
|
|
!isComposerEmpty &&
|
|
isWorkspaceChatReady
|
|
);
|
|
}
|