/** * Shared mailbox selector — switch between personal and shared accounts. */ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Select } from '@/components/ui/Select'; import type { MailAccount } from '@/api/mail'; export interface SharedMailboxSelectorProps { accounts: MailAccount[]; selectedAccountId: string; onSelect: (accountId: string) => void; } export function SharedMailboxSelector({ accounts, selectedAccountId, onSelect }: SharedMailboxSelectorProps) { const { t } = useTranslation(); const options = accounts.map((acc) => ({ value: acc.id, label: `${acc.display_name} (${acc.email})${acc.is_shared ? ' — ' + t('mail.shared') : ''}`, })); return (