{hasImgs
? imgs.map((url, i) => (
))
:
}
{/* botão fechar */}
{/* contador de fotos — sempre no mesmo lugar, sem conflito com botão de vídeo */}
{imgs.length > 1 && (
{imgIdx + 1} / {imgs.length}
)}
{/* setas de navegação */}
{imgs.length > 1 && (<>
>)}
{/* título + preço + vídeo sobre a imagem */}
setLocal("domicilio")}>Na minha casa setLocal("loja")}>No estabelecimento
{
const iso = `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')}`;
onConfirm({ dateISO: iso, dateLabel, time, local });
}}>
{time ? `Confirmar · ${dateLabel} às ${time}` : "Escolha um horário"}
);
}
// ── Lead sheet (vitrine) ─────────────────────────────────────
function LeadSheet({ partner, listing, onConfirm, user }) {
const [pref, setPref] = React.useState("whats");
const [msg, setMsg] = React.useState(listing ? `Tenho interesse em: ${listing.title}` : "Tenho interesse e gostaria de mais informações.");
const u = user || USER;
return (
{/* mapa — position:relative + zIndex:1 isola os z-indexes internos do Leaflet (400-700)
para que o header/footer possam ficar acima sem conflito */}
{/* header com botão voltar — zIndex alto para ficar acima do mapa */}