"use client" import { useState } from "react" import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Gift, Shield } from "lucide-react" interface Props { onSubmit: (data: { donorName: string donorEmail: string donorPhone: string giftAid: boolean }) => void amount: number } export function IdentityStep({ onSubmit, amount }: Props) { const [name, setName] = useState("") const [email, setEmail] = useState("") const [phone, setPhone] = useState("") const [giftAid, setGiftAid] = useState(false) const [submitting, setSubmitting] = useState(false) const hasContact = email.includes("@") || phone.length >= 10 const isValid = hasContact const giftAidBonus = Math.round(amount * 0.25) const handleSubmit = async () => { if (!isValid) return setSubmitting(true) try { await onSubmit({ donorName: name, donorEmail: email, donorPhone: phone, giftAid }) } catch { setSubmitting(false) } } return (

Almost there!

We need a way to send you payment details

setName(e.target.value)} autoComplete="name" />
setEmail(e.target.value)} autoComplete="email" inputMode="email" />

We'll send your payment instructions and receipt here

or
setPhone(e.target.value)} autoComplete="tel" inputMode="tel" />

We can send reminders via SMS if you prefer

{/* Gift Aid — prominent UK-specific */}
setGiftAid(!giftAid)} className={`rounded-2xl border-2 p-5 cursor-pointer transition-all ${ giftAid ? "border-success-green bg-success-green/5 shadow-md shadow-success-green/10" : "border-gray-200 bg-white hover:border-success-green/50" }`} >
{}} className="h-5 w-5 rounded border-gray-300 text-success-green focus:ring-success-green" /> Add Gift Aid {giftAid && ( +£{(giftAidBonus / 100).toFixed(0)} free )}

Boost your £{(amount / 100).toFixed(0)} pledge to{" "} £{((amount + giftAidBonus) / 100).toFixed(0)} at no extra cost. HMRC adds 25% — the charity claims it back.

{giftAid && (

I confirm I am a UK taxpayer and understand that if I pay less Income Tax and/or Capital Gains Tax than the amount of Gift Aid claimed on all my donations in that tax year it is my responsibility to pay any difference.

)}
Your data is kept secure and only used for this pledge
) }