'use client'; import { useState } from 'react'; import Image from 'next/image'; interface ProfileSettingsFormProps { initialData?: { fullName: string; career: string; email: string; phone: string; location: string; }; onSave?: (data: { fullName: string; career: string; email: string; phone: string; location: string; }) => void; descriptionText?: string; } export function ProfileSettingsForm({ initialData = { fullName: 'Brain Neeland', career: 'Real Estate Agent', email: 'Brain.Neeland1234@gmail.com', phone: '+917483849544', location: 'New York', }, onSave, descriptionText = 'This information will be displayed on your public profile page.', }: ProfileSettingsFormProps) { const [formData, setFormData] = useState(initialData); const handleChange = (field: string, value: string) => { setFormData((prev) => ({ ...prev, [field]: value })); }; const handleSave = () => { if (onSave) { onSave(formData); } else { console.log('Saving profile settings:', formData); } }; const handleCancel = () => { setFormData(initialData); }; return (
{/* Header */}

Public Profile

{descriptionText}

{/* Profile Photo Section */}
Profile

Public Picture

Supported formats: JPEG, PNG, GIF Max file size: 2MB

{/* Form Fields */}
{/* Row 1: Full Name & Career */}
handleChange('fullName', e.target.value)} className="w-full h-[44px] px-4 border border-[#00293D]/20 rounded-[10px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" />
handleChange('career', e.target.value)} className="w-full h-[44px] px-4 border border-[#00293D]/20 rounded-[10px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" />
{/* Row 2: Email & Phone */}
handleChange('email', e.target.value)} className="w-full h-[44px] px-4 border border-[#00293D]/20 rounded-[10px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" />
handleChange('phone', e.target.value)} className="w-full h-[44px] px-4 border border-[#00293D]/20 rounded-[10px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" />
{/* Row 3: Location */}
Location
handleChange('location', e.target.value)} className="w-full sm:w-1/2 h-[44px] pl-10 pr-4 border border-[#00293D]/20 rounded-[10px] text-[14px] font-serif text-[#00293D] focus:outline-none focus:border-[#E58625]" />
{/* Action Buttons */}
); }