import { PencilIcon } from 'lucide-react' import Link from 'next/link' import { StateDeputyChips } from '@/components/campaign/stateDeputy/StateDeputyChips' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { municipalityPriorityLabels, politicalTrendBadgeVariant, politicalTrendLabels, } from '@/utilities/municipalityLabels' import type { MunicipalityStrategyViewModel } from '@/utilities/municipalityViewModels' const dateFormatter = new Intl.DateTimeFormat('pt-BR') export const MunicipalityStrategyCard = ({ strategy, municipalitySlug, canEdit, }: { strategy: MunicipalityStrategyViewModel municipalitySlug: string canEdit: boolean }) => { 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}
{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} {strategy.budgetNotes ? (

Emendas aportadas

{strategy.budgetNotes}

) : null}
) }