"use client"; import { Camera, ChevronRight, Globe, Link2, Mail, MapPin, Phone, Settings, User, X, } from "lucide-react"; import { useState } from "react"; import { FileUpload, FileUploadDropzone, FileUploadItem, FileUploadItemDelete, FileUploadItemPreview, FileUploadList, FileUploadTrigger, } from "@/components/diceui/file-upload"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { Separator } from "@/components/ui/separator"; import { Textarea } from "@/components/ui/textarea"; import { cn } from "@/lib/utils"; interface ProfileData { name: string; username: string; email: string; avatar?: string; bio?: string; phone?: string; location?: string; website?: string; twitter?: string; linkedin?: string; github?: string; timezone?: string; language?: string; } interface SettingsProfile4Props { defaultValues?: Partial; className?: string; } const sections = [ { id: "personal", label: "اطلاعات پایه", icon: User }, { id: "contact", label: "اطلاعات تماس", icon: Mail }, { id: "social", label: "لینک‌های حرفه‌ای", icon: Link2 }, { id: "preferences", label: "ترجیحات حساب", icon: Settings }, ]; const SettingsProfile4 = ({ defaultValues = { name: "الهام میرزایی", username: "elah.mirzaei", email: "alex.morgan@email.com", avatar: "/block-media/shadcnblocks/block/avatar/avatar8.jpg", bio: "مدیر موفقیت مشتری با تمرکز روی ماندگاری حساب و رشد گسترش. علاقه‌مند به آنبوردینگ و سنجش سلامت مشتری.", phone: "+98 912 345 6789", location: "تهران، ایران", website: "https://alexmorgan.design", twitter: "alexmorgan", linkedin: "alexmorgan", github: "alexmorgan", timezone: "America/Los_Angeles", language: "en", }, className, }: SettingsProfile4Props) => { const [activeSection, setActiveSection] = useState("personal"); const [avatarFiles, setAvatarFiles] = useState([]); const initials = defaultValues.name ?.split(" ") .map((n) => n[0]) .join("") .toUpperCase(); const avatarPreview = avatarFiles.length > 0 ? URL.createObjectURL(avatarFiles[0]) : defaultValues.avatar; return (
{/* Header */}
تنظیمات حساب ویرایش پروفایل

ویرایش پروفایل

اطلاعات پروفایل و ترجیحات حساب خود را مدیریت کنید

{/* Sidebar Navigation */} {/* Main Content */}
{/* Personal Info Section */} {activeSection === "personal" && (

اطلاعات شخصی

عکس و مشخصات پایه پروفایل را به‌روز کنید

{/* Avatar */}
{initials}

{" "} یا فایل را اینجا رها کنید

JPG، PNG یا WEBP (حداکثر ۲ مگابایت)

{avatarFiles.length > 0 && ( {avatarFiles.map((file, index) => (

{file.name}

{(file.size / 1024).toLocaleString("fa-IR", { maximumFractionDigits: 1, })}{" "} کیلوبایت

))}
)}
@