import { AlertTriangleIcon, Clock3Icon } from 'lucide-react' import { Badge } from '@/components/ui/Badge' import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from '@/components/ui/card' import { TseZoneBadge } from '@/components/campaign/TseZoneBadge' import { cn } from '@/lib/utils' import { nucleusPriorityLabels } from '@/utilities/nucleusUi' const voteFormatter = new Intl.NumberFormat('pt-BR') export type NucleusCardProps = { name: string territory: string organization?: string tseZones?: number[] confirmedVoteEstimate?: number | null hasPendingEstimate?: boolean isHighPriority?: boolean lastUpdateLabel?: string isUpdateOverdue?: boolean leadershipCounts?: { engaged: number toApproach: number disputed?: number } actions?: React.ReactNode className?: string } export const NucleusCard = ({ name, territory, organization, tseZones = [], confirmedVoteEstimate, hasPendingEstimate = false, isHighPriority = false, lastUpdateLabel, isUpdateOverdue = false, leadershipCounts, actions, className, }: NucleusCardProps) => (
{name} {isHighPriority ? {nucleusPriorityLabels.alta} : null}
{[organization, territory].filter(Boolean).join(' · ')} {tseZones.length > 0 ? (
{tseZones.map((zoneNumber) => ( ))}
) : ( Sem Zona TSE )}
{confirmedVoteEstimate == null ? 'Sem estimativa confirmada' : `${voteFormatter.format(confirmedVoteEstimate)} votos`} {hasPendingEstimate ? Sugestão pendente : null}
{leadershipCounts ? (

{leadershipCounts.engaged} engajadas {' · '} {leadershipCounts.toApproach} a abordar {leadershipCounts.disputed != null ? ` · ${leadershipCounts.disputed} em disputa` : null}

) : null} {lastUpdateLabel ? (
{isUpdateOverdue ? (
) : null}
{actions ? {actions} : null}
)