"use client"; import { zodResolver } from "@hookform/resolvers/zod"; import { ArrowRight, ChevronDown, Cookie, Facebook, Github, Languages, Linkedin, Twitter, } from "lucide-react"; import { Controller, useForm } from "react-hook-form"; import { z } from "zod"; import { Button } from "@/components/ui/button"; import { Dialog, DialogClose, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; import { Drawer, DrawerClose, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger, } from "@/components/ui/drawer"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Field, FieldLabel } from "@/components/ui/field"; import { Switch } from "@/components/ui/switch"; import { cn } from "@/lib/utils"; interface LanguageOption { label: string; description: string; link: string; } interface CookiesOption { title: string; description: string; id: string; } interface PrivacyDialog { trigger: string; title: string; text: string; } interface LanguagesSelectProps { languages: Array; } const HOME_LINK = "https://ShadcnBlocks"; const LOGO = "/block-media/shadcnblocks/block/logos/ShadcnBlockscom-icon.svg"; const SOCIAL_LINKS = [ { icon: Github, href: "#", }, { icon: Linkedin, href: "#", }, { icon: Facebook, href: "#", }, { icon: Twitter, href: "#", }, ]; const LANGUAGES: Array = [ { label: "فارسی", description: "فارسی (ایران)", link: "#", }, { label: "English", description: "انگلیسی (آمریکا)", link: "#", }, { label: "Français (France)", description: "فرانسوی", link: "#", }, { label: "Deutsch", description: "آلمانی", link: "#", }, { label: "日本語", description: "ژاپنی", link: "#", }, { label: "한국어", description: "کره‌ای", link: "#", }, ]; const COOKIES_OPTIONS: Array = [ { id: "1", title: "ضروری", description: "برای امنیت و عملکرد فضای کاری لازم است. همیشه فعال است.", }, { id: "2", title: "عملکردی", description: "ترجیحات تیم و قابلیت‌های پیشرفته همکاری را فعال می‌کند.", }, { id: "3", title: "تحلیلی", description: "نحوه استفاده تیم از ابزارها را برای بهبود محصول اندازه‌گیری می‌کند.", }, { id: "4", title: "بازاریابی", description: "به‌روزرسانی محصول و پیشنهادهای مرتبط را شخصی‌سازی می‌کند.", }, ]; const NAVIGATION = [ { title: "شرکت", links: [ { name: "درباره ما", href: "#", }, { name: "فرصت‌های شغلی", href: "#", }, { name: "امنیت فضای کاری", href: "#", }, { name: "وضعیت سرویس", href: "#", }, { name: "حقوقی و حریم خصوصی", href: "#", }, ], }, { title: "دانلود", links: [ { name: "اپ موبایل (iOS و Android)", href: "#", }, { name: "اپ دسکتاپ (Mac و Windows)", href: "#", }, { name: "افزونه مرورگر", href: "#", }, ], }, { title: "منابع", links: [ { name: "مرکز راهنما", href: "#", }, { name: "قیمت‌گذاری", href: "#", }, { name: "وبلاگ همکاری تیمی", href: "#", }, { name: "انجمن کاربران", href: "#", }, { name: "یکپارچه‌سازی‌ها", href: "#", }, { name: "قالب‌های پروژه", href: "#", }, { name: "برنامه شرکا", href: "#", }, ], }, { title: "راهکارها", links: [ { name: "سازمان‌های بزرگ", href: "#", }, { name: "تیم‌های در حال رشد", href: "#", }, { name: "فریلنسرها", href: "#", }, ], }, ]; const PRIVACY_DIALOG: PrivacyDialog = { trigger: "اطلاعات من را نفروشید یا به اشتراک نگذارید", title: "انصراف از اشتراک‌گذاری داده با شرکای تبلیغاتی ثبت شد.", text: ` CollabSpace ممکن است برای نمایش پیشنهادهای مرتبط از کوکی و پیکسل استفاده کند. با انصراف، داده‌تان برای تبلیغات هدفمند به اشتراک گذاشته نمی‌شود. همچنان ممکن است پیام‌های محصول ببینید، اما شخصی‌سازی محدودتر خواهد بود. `, }; const FormSchema = z.object({ cookies: z.array(z.string()).refine((value) => value.some((item) => item), { message: "", }), }); interface CookiesPanelProps { cookiesOptions: Array; } const CookiesPanel = ({ cookiesOptions }: CookiesPanelProps) => { const form = useForm>({ resolver: zodResolver(FormSchema), defaultValues: { cookies: ["1"], }, }); function onSubmit(data: z.infer) { console.log(data.cookies); } return (
از کوکی‌ها برای بهبود تجربه همکاری تیمی استفاده می‌کنیم. برای جزئیات بیشتر{" "} {" "} را ببینید.
( {cookiesOptions.map((opt) => (

{opt.title}

{opt.description}

{ return checked ? field.onChange([...field.value, opt.id]) : field.onChange( field.value?.filter((value) => value !== opt.id), ); }} />
))}
)} />
); }; const LanguagesSelect = ({ languages }: LanguagesSelectProps) => { return ( {languages.map((lang, i) => (
{lang.label}
{lang.description}
))}
); }; const PrivacyDialog = ({ trigger, title, text }: PrivacyDialog) => { return ( {title} {text} ); }; interface Footer18Props { className?: string; } const Footer18 = ({ className }: Footer18Props) => { return (
); }; export { Footer18 };