// ContactScreen — Página de contato da SBL
function ContactScreen({ onNav }) {
const { Button } = window.SBLImVeisDesignSystem_08a506;
const { isMobile, isTablet } = window.useResponsive();
const { t } = window.useLang();
const { useState, useEffect } = React;
// ← Substitua pelo e-mail real da Sibelle para receber os formulários
const CONTATO_EMAIL = 'contato@sblimoveislocacoes.com.br';
const [type, setType] = useState('client');
const [form, setForm] = useState({ name: '', email: '', phone: '', subject: '', message: '' });
const [errors, setErrors] = useState({});
const [sent, setSent] = useState(false);
useEffect(() => {
const t = setTimeout(() => { if (window.lucide) window.lucide.createIcons({ attrs: { 'stroke-width': 1.75 } }); }, 60);
return () => clearTimeout(t);
});
const waLinks = {
client: 'https://wa.me/558399585248?text=Ol%C3%A1%2C%20vim%20pelo%20site%20da%20SBL%20e%20gostaria%20de%20ver%20im%C3%B3veis%20dispon%C3%ADveis.',
owner: 'https://wa.me/558399585248?text=Ol%C3%A1%2C%20vim%20pelo%20site%20da%20SBL%20e%20tenho%20um%20im%C3%B3vel%20para%20anunciar.',
};
const tabs = [
{ id: 'client', icon: 'user', label: 'Sou hóspede ou locatário', sublabel: 'Quero conhecer imóveis disponíveis' },
{ id: 'owner', icon: 'building-2', label: 'Tenho um imóvel', sublabel: 'Quero anunciar ou saber mais' },
];
const subjectOpts = {
client: ['Busco imóvel para temporada', 'Busco imóvel para alugar', 'Busco imóvel para comprar', 'Quero agendar uma visita', 'Tenho uma dúvida'],
owner: ['Quero anunciar meu imóvel', 'Quero saber o valor do meu imóvel', 'Tenho imóvel para venda', 'Tenho imóvel para aluguel anual', 'Quero gestão de temporada'],
};
function validate() {
const e = {};
if (!form.name.trim()) e.name = t('Informe seu nome');
if (!form.email.trim() || !/\S+@\S+\.\S+/.test(form.email)) e.email = t('E-mail inválido');
if (!form.message.trim()) e.message = t('Escreva sua mensagem');
setErrors(e);
return Object.keys(e).length === 0;
}
function handleSubmit(e) {
e.preventDefault();
if (!validate()) return;
const typeLabel = type === 'client' ? 'Hóspede/Locatário' : 'Proprietário';
const subj = encodeURIComponent(`[SBL] ${typeLabel}${form.subject ? ' — ' + form.subject : ' — contato pelo site'}`);
const body = encodeURIComponent(
`Tipo: ${typeLabel}\nNome: ${form.name}\nE-mail: ${form.email}\nTelefone: ${form.phone || '(não informado)'}\n\n${form.message}`
);
window.location.href = `mailto:${CONTATO_EMAIL}?subject=${subj}&body=${body}`;
setSent(true);
}
function InputField({ label, value, onChange, type: t = 'text', placeholder, error, required }) {
return (
{error && {error}}
);
}
const channels = [
{
icon: 'phone', label: t('Ligar agora'), value: '(83) 9958-5248',
sub: t('Seg–Sex 8h–18h · Sáb 8h–13h'),
buttonLabel: t('Ligar'), color: 'var(--brown-700)', bg: 'var(--brown-100)',
onClick: () => { window.location.href = 'tel:+558399585248'; },
},
{
icon: 'message-circle', label: 'WhatsApp', value: '(83) 9958-5248',
sub: t('Resposta rápida · Todos os dias'),
buttonLabel: t('Enviar mensagem'), color: 'var(--green-700)', bg: 'var(--green-100)',
onClick: () => { window.open(waLinks[type], '_blank'); },
},
{
icon: 'mail', label: t('Formulário'), value: t('Resposta em até 24h'),
sub: t('Mensagem detalhada por e-mail'),
buttonLabel: t('Ir para o formulário'), color: 'var(--rose-700)', bg: 'var(--rose-100)',
onClick: () => { document.getElementById('contact-form')?.scrollIntoView({ behavior: 'smooth' }); },
},
];
const inputSty = { width: '100%', padding: '13px 16px', fontSize: 15, fontFamily: 'var(--font-body)', border: '1.5px solid var(--border-default)', borderRadius: 10, outline: 'none', background: 'var(--white)', color: 'var(--text-strong)', boxSizing: 'border-box' };
const labelSty = { display: 'block', fontFamily: 'var(--font-body)', fontSize: 12.5, fontWeight: 600, color: 'var(--text-body)', marginBottom: 6, letterSpacing: '0.03em' };
return (
{/* ── HERO ── */}
{/* Texto */}
{t('Contato')}
{t('Estamos prontos')}
{t('para te atender')}
{t('Para alugar, comprar, anunciar ou tirar dúvidas — a Sibelle atende com atenção e sem enrolação.')}
{/* Card Sibelle */}

{ e.target.style.display = 'none'; e.target.parentElement.innerHTML = '
S'; }} />
Sibelle Bernardes
{t('Corretora de Imóveis')}
CRECI/PB 16696
{[
{ icon: 'phone', text: '(83) 9958-5248', href: 'tel:+558399585248' },
{ icon: 'map-pin', text: 'João Pessoa, Paraíba' },
{ icon: 'clock', text: 'Seg–Sex 8h–18h · Sáb 8h–13h' },
].map((row, i) => (
))}
{/* ── TIPO DE CONTATO ── */}
{t('Como posso ajudar?')}
{t('Me conte a sua situação')}
{tabs.map(tab => (
))}
{/* ── CANAIS DE CONTATO ── */}
{channels.map((ch, i) => (
{ch.label}
{ch.value}
{!isMobile &&
{ch.sub}
}
{!isMobile && (
)}
{isMobile && (
)}
))}
{/* ── FORMULÁRIO ── */}
{/* ── MAPA ── */}
{/* Mapa */}
{/* Informações */}
{t('Onde estamos')}
João Pessoa,
Paraíba
{[
{ icon: 'map-pin', title: 'Endereço', lines: ['Endereço completo em breve'], italic: true },
{ icon: 'phone', title: 'Telefone', lines: ['(83) 9958-5248'], href: 'tel:+558399585248' },
{ icon: 'clock', title: 'Atendimento', lines: ['Segunda a Sexta: 8h às 18h', 'Sábado: 8h às 13h'], extra: 'WhatsApp disponível todos os dias' },
{ icon: 'shield-check', title: 'Registro profissional', lines: ['Sibelle Bernardes'], badge: 'CRECI/PB 16696' },
].map((row, i) => (
{t(row.title)}
{row.lines.map((l, j) => (
row.href
?
{t(l)}
:
{t(l)}
))}
{row.badge &&
{row.badge}
}
{row.extra &&
{t(row.extra)}
}
))}
);
}
window.ContactScreen = ContactScreen;