import { useState } from 'react' import { Link } from 'react-router-dom' import Footer from '../components/Footer' import Navbar from '../components/Navbar' import { submitJobApplication, type JobApplicationPayload } from '../services/jobs' const ROLE_OPTIONS = [ 'Corretor(a)', 'Assistente Administrativo', 'Estagiário(a)', 'Outro', ] const BENEFITS = [ { icon: ( ), title: 'Equipe colaborativa', description: 'Trabalhe com profissionais experientes em um ambiente de apoio mútuo e crescimento constante.', }, { icon: ( ), title: 'Crescimento real', description: 'Plano de carreira claro, metas atingíveis e reconhecimento de resultados individuais e coletivos.', }, { icon: ( ), title: 'Flexibilidade', description: 'Horários adaptáveis, comissionamento competitivo e autonomia para gerenciar sua agenda.', }, ] interface FormState { name: string email: string phone: string role_interest: string message: string file_name: string privacy: boolean } const INITIAL: FormState = { name: '', email: '', phone: '', role_interest: '', message: '', file_name: '', privacy: false, } function InputField({ label, name, type = 'text', required = false, value, onChange, placeholder, }: { label: string name: string type?: string required?: boolean value: string onChange: (e: React.ChangeEvent) => void placeholder?: string }) { return (
) } export default function JobsPage() { const [form, setForm] = useState(INITIAL) const [loading, setLoading] = useState(false) const [success, setSuccess] = useState(false) const [error, setError] = useState(null) function handleChange( e: React.ChangeEvent ) { const { name, value, type } = e.target if (type === 'checkbox') { setForm((prev) => ({ ...prev, [name]: (e.target as HTMLInputElement).checked })) } else { setForm((prev) => ({ ...prev, [name]: value })) } } async function handleSubmit(e: React.FormEvent) { e.preventDefault() if (!form.privacy) { setError('Você precisa aceitar a política de privacidade.') return } setLoading(true) setError(null) try { const payload: JobApplicationPayload = { name: form.name, email: form.email, phone: form.phone || undefined, role_interest: form.role_interest, message: form.message, file_name: form.file_name || undefined, } await submitJobApplication(payload) setSuccess(true) setForm(INITIAL) } catch { setError('Não foi possível enviar sua candidatura. Tente novamente.') } finally { setLoading(false) } } return ( <>
{/* Hero */}
Oportunidades

Trabalhe Conosco

Faça parte de um time apaixonado pelo mercado imobiliário. Envie seu currículo e conte-nos por que você quer crescer com a gente.

{/* Benefícios */}

Por que trabalhar conosco?

{BENEFITS.map((b) => (
{b.icon}

{b.title}

{b.description}

))}
{/* Formulário */}

Envie sua candidatura

Preencha os campos abaixo e entraremos em contato.

{success ? (

Candidatura enviada com sucesso!

Entraremos em contato em breve.

) : (
{/* Dados pessoais */}
{/* Cargo de interesse */}
{/* Nome do arquivo */} {/* Mensagem */}