import { deskInboxUnread, useColleagueInboxUnread, useDeskPatientInboxUnread } from './useDeskInboxUnread'; import { staffMessagesBadge, type StaffMessagesPageKind } from '../utils/messaging/staffMessagesBadge'; // The staff Messages badge, from the same counts the Inbox tab shows; the colleague rows are read once. /** `staffReader` false (the patient portal) reads no colleague conversations and asks for no colleague list. */ export const useStaffMessagesBadge = (page: StaffMessagesPageKind, awaitingReply: number, staffReader = true): number => { const colleagueInboxUnread = useColleagueInboxUnread(staffReader); return staffMessagesBadge({ page, deskInboxUnread: deskInboxUnread(useDeskPatientInboxUnread(), colleagueInboxUnread), colleagueInboxUnread, awaitingReply, }); };