import { useTranslation } from 'react-i18next'; import { Card } from '@/components/ui/Card'; import { Button } from '@/components/ui/Button'; import { EmptyState } from '@/components/ui/EmptyState'; import styles from '@/pages/AuthFilesPage.module.scss'; type UnsupportedError = 'unsupported' | null; export type OAuthExcludedCardProps = { disableControls: boolean; excludedError: UnsupportedError; excluded: Record; onAdd: () => void; onEdit: (provider: string) => void; onDelete: (provider: string) => void; }; export function OAuthExcludedCard(props: OAuthExcludedCardProps) { const { t } = useTranslation(); const { disableControls, excludedError, excluded, onAdd, onEdit, onDelete } = props; return ( {t('oauth_excluded.add')} } > {excludedError === 'unsupported' ? ( ) : Object.keys(excluded).length === 0 ? ( ) : (
{Object.entries(excluded).map(([provider, models]) => (
{provider}
{models?.length ? t('oauth_excluded.model_count', { count: models.length }) : t('oauth_excluded.no_models')}
))}
)}
); }