import { PencilIcon } from 'lucide-react' import Link from 'next/link' import { StaffMunicipalityVotesDisplay } from '@/components/campaign/StaffMunicipalityVotesDisplay' import { StateDeputyChips } from '@/components/campaign/StateDeputyChips' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { municipalityPriorityLabels, politicalTrendBadgeVariant, politicalTrendLabels, } from '@/utilities/municipalityUi' import type { MunicipalityDetailViewModel } from '@/utilities/municipalityViewModels' import type { MunicipalityPledgeCoverageView } from '@/utilities/votePledgeData' const dateFormatter = new Intl.DateTimeFormat('pt-BR') export const MunicipalityStrategyCard = ({ strategy, municipalitySlug, canEdit, pledgeCoverage, }: { strategy: NonNullable municipalitySlug: string canEdit: boolean pledgeCoverage: MunicipalityPledgeCoverageView | null }) => { const trend = strategy.politicalTrend return (

Estratégia do município

{strategy.priority === 'alta' ? ( {municipalityPriorityLabels.alta} ) : ( Prioridade normal )} {trend.status ? ( Tendência {politicalTrendLabels[trend.status].toLowerCase()} ) : ( Tendência não registrada )}
{canEdit ? ( ) : null}

Votos estimados

{trend.status || trend.note ? (

Tendência política

{trend.note ? (

{trend.note}

) : null} {trend.recordedAt ? (

Registrada {trend.recordedByName ? `por ${trend.recordedByName} ` : ''}em{' '} {dateFormatter.format(new Date(trend.recordedAt))}

) : null}
) : null} {strategy.strengths.length > 0 || strategy.risks.length > 0 ? (
{strategy.strengths.length > 0 ? (

Forças

    {strategy.strengths.map((text) => (
  • {text}
  • ))}
) : null} {strategy.risks.length > 0 ? (

Riscos

    {strategy.risks.map((text) => (
  • {text}
  • ))}
) : null}
) : null} {strategy.stateDeputies.length > 0 ? (

Dobradinhas

) : null} {strategy.dobradinhaNotes ? (

Dobradinhas (notas)

{strategy.dobradinhaNotes}

) : null} {strategy.nextSteps ? (

Encaminhamentos

{strategy.nextSteps}

) : null}
) }