'use client' import { MailIcon, MessageCircleIcon, PencilIcon } from 'lucide-react' import { updateContactFullFormAction } from '@/app/(campaign)/campanha/(app)/contatos/formActions' import { ContactFormSheet } from '@/components/campaign/contacts/ContactFormSheet' import { DeletePersonButton } from '@/components/campaign/people/DeletePersonButton' import { Badge } from '@/components/ui/Badge' import { Button } from '@/components/ui/button' import { formatBrazilianPhoneInput, whatsAppHrefForPhone } from '@/lib/phone' import type { ContactRowViewModel } from '@/utilities/contacts/contactListData' import { contactGenderLabels } from '@/utilities/contacts/contactListUrl' const editTriggerClassName = 'size-10 rounded-full' /** * C139 — the mobile ficha card (below `md`): name + secondary line (primary * phone ?? e-mail), gender chip + "Cidade · Estado", and the actions row * (WhatsApp / e-mail / edit / delete). Editing opens the shared ficha sheet. */ export const ContactMobileCard = ({ row, canDelete, }: { row: ContactRowViewModel canDelete: boolean }) => { const whatsAppHref = whatsAppHrefForPhone(row.phones[0] ?? null) const secondary = row.phones.length > 0 ? formatBrazilianPhoneInput(row.phones[0]!) : (row.email ?? 'Sem contato registrado') const place = [row.city, row.state].filter(Boolean).join(' · ') return (
  • {row.name}

    {secondary}

    {whatsAppHref ? ( ) : null} {row.email ? ( ) : null} {canDelete ? ( ) : null}
    {row.gender || place ? (
    {row.gender ? ( {contactGenderLabels[row.gender]} ) : null} {place ? {place} : null}
    ) : null}
  • ) }