"use client" import { mailLabelShouldShowInListStrip } from "@/components/gmail/mail-label-pills" import { EmailView } from "@/components/gmail/email-view" import { LABEL_PICKER_EXCLUDE } from "@/lib/mail-list/label-actions" import { threadStoreId } from "@/lib/mail-settings/list-row-id" import type { EmailListData } from "@/components/gmail/email-list/hooks/use-email-list-data" import type { EmailListReading } from "@/components/gmail/email-list/hooks/use-email-list-reading" import type { EmailListSelection } from "@/components/gmail/email-list/hooks/use-email-list-selection" type EmailListEmailViewPaneProps = { data: EmailListData reading: EmailListReading selection: EmailListSelection } export function EmailListEmailViewPane({ data, reading, selection, }: EmailListEmailViewPaneProps) { const { openEmail, openEmailThreadRoot, isSingleMessageView, handleNavigateToLabel, singleNotSpam, } = reading const { toggleStar } = selection const { starredEmails, listRowLabelBgByTextLower, sidebarNav, selectedFolder, } = data if (!openEmail) return null return ( { if (LABEL_PICKER_EXCLUDE.has(lab)) return true return mailLabelShouldShowInListStrip( lab, sidebarNav.emailLabelToSidebarFolderId, sidebarNav.getNavItemPrefs, sidebarNav.labelRows ) }} /> ) } export type { EmailListEmailViewPaneProps }