import { useState } from 'react'; import { Helmet } from 'react-helmet-async'; import { motion } from 'framer-motion'; import { HiCheck, HiArrowRight, HiArrowLeft } from 'react-icons/hi'; import { CAMPAIGN_CATEGORIES, URGENCY_LEVELS } from '../utils/constants'; import toast from 'react-hot-toast'; const steps = ['Type & Urgency', 'Description', 'Location & Contact', 'Review']; export default function HelpRequest() { const [step, setStep] = useState(0); const [submitted, setSubmitted] = useState(false); const [form, setForm] = useState({ requestType: '', urgency: '', title: '', description: '', estimatedAmount: '', address: '', city: '', state: '', pincode: '', contactPerson: '', contactPhone: '', }); const updateForm = (key, val) => setForm(f => ({ ...f, [key]: val })); const nextStep = () => { if (step === 0 && (!form.requestType || !form.urgency)) return toast.error('Select type and urgency'); if (step === 1 && (!form.title || !form.description)) return toast.error('Add title and description'); if (step === 2 && (!form.contactPerson || !form.contactPhone)) return toast.error('Add contact info'); setStep(s => Math.min(s + 1, 3)); }; const handleSubmit = (e) => { e.preventDefault(); // TODO: Save to Firestore setSubmitted(true); }; if (submitted) { return ( <> Request Submitted

Help Request Submitted

Our team will review your request and reach out within 24-48 hours. Track status in your dashboard.

); } return ( <> Request Help — Social Share and Care Foundation
🆘 Request Help

We're Here to Help

Submit a help request and our team will prioritize based on urgency.

{/* Step Indicator */}
{steps.map((s, i) => (
{i < step ? : i + 1}
{s} {i < steps.length - 1 &&
}
))}
{step === 0 && ( <>

Type & Urgency

{CAMPAIGN_CATEGORIES.map(cat => ( ))}
{URGENCY_LEVELS.map(level => ( ))}
)} {step === 1 && ( <>

Describe Your Situation

updateForm('title', e.target.value)} required />