import { PlusIcon } from 'lucide-react' import Link from 'next/link' import { SupportStatusBadge } from '@/components/campaign/leadership/SupportStatusBadge' import { DeclareVotesForm } from '@/components/campaign/votePledge/DeclareVotesForm' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import type { CampaignFormActionState } from '@/utilities/campaignFormActionError' import type { LeadershipRowViewModel } from '@/utilities/leadership/leadershipData' import type { StaffPledgeRow } from '@/utilities/votePledgeViews' type MunicipalityLeadershipsPanelProps = { municipalityID: number leaderships: LeadershipRowViewModel[] pledges: StaffPledgeRow[] declareFormAction: ( state: CampaignFormActionState, formData: FormData, ) => Promise } /** Staff-only: leaderships linked to this municipality + declare-on-behalf form. */ export const MunicipalityLeadershipsPanel = ({ municipalityID, leaderships, pledges, declareFormAction, }: MunicipalityLeadershipsPanelProps) => { const pledgeByLeadership = new Map(pledges.map((pledge) => [pledge.leadershipID, pledge])) return (

Lideranças deste município

Uma liderança pode atuar em vários municípios e organizações.

{leaderships.length ? ( ) : (

Nenhuma liderança vinculada a este município ainda.

)}
) }