'use client' import { useState } from 'react' import { Checkbox } from '@/components/ui/Checkbox' import { Field, FieldDescription, FieldError, FieldLabel } from '@/components/ui/field' import { Textarea } from '@/components/ui/textarea' import { ToggleGroup, ToggleGroupItem } from '@/components/ui/ToggleGroup' import { municipalityUpdatePolarityLabels, type MunicipalityUpdatePolarity, } from '@/lib/schemas/municipalityUpdate' import { fieldError } from '@/utilities/campaignFormFields' type MunicipalityUpdateFieldsProps = { idPrefix: string fieldErrors?: Record isStaff: boolean /** * 'labeled' (desktop): visible labels, descriptions and bordered fields. * 'list' (mobile): visually hidden labels, no borders, full-bleed divider * rows and right-aligned check boxes (C107 — the field is the same, only * the presentation varies). */ layout?: 'labeled' | 'list' } const POLARITY_OPTIONS = ['ruim', 'neutra', 'boa'] as const /** * One Urgente/Sinalizar adversário row. In the list layout the row is a * `