"use client"; import React, { useState } from "react"; import { Play, PlayCircle, Star, ShieldCheck, X } from "lucide-react"; import { motion, AnimatePresence } from "motion/react"; import Link from "next/link"; import { useRouter } from "next/navigation"; import { useSettingsStore } from "../lib/store/settingsStore"; import SafeImage from "./SafeImage"; const VIDEOS = [ { id: "v1", title: "نحوه آماده‌سازی کانی‌هیدروکس", doctor: "دکتر کلاوس هنینگ", duration: "۱:۴۵", thumbnail: "https://images.unsplash.com/photo-1576091160550-217359f42f8c?auto=format&fit=crop&q=80&w=400", videoUrl: "https://www.w3schools.com/html/mov_bbb.mp4", // Placeholder real-looking video description: "آموزش گام به گام آماده‌سازی پودر Canhydrox GAG برای جذب حداکثری در دستگاه گوارش." }, { id: "v2", title: "اهمیت صدف لب‌سبز", doctor: "دکتر النا اشمیت", duration: "۲:۲۰", thumbnail: "https://images.unsplash.com/photo-1599443015574-be5fe8a05783?auto=format&fit=crop&q=80&w=400", videoUrl: "https://www.w3schools.com/html/movie.mp4", description: "چرا صدف لب‌سبز نیوزیلندی نایاب‌ترین و موثرترین ماده برای بازسازی مفصل است؟" }, { id: "v3", title: "تغذیه هوشمند توله‌سگ‌ها", doctor: "دکتر هلگا فیشر", duration: "۳:۱۰", thumbnail: "/assets/images/regenerated_image_1779109861747.png", videoUrl: "https://www.w3schools.com/html/mov_bbb.mp4", description: "دوز مصرفی مکمل‌های کلسیم در نژادهای بزرگ برای جلوگیری از بدشکلی‌های استخوانی." } ]; export default function VetGallery({ testimonials = [] }: { testimonials?: any[] }) { const router = useRouter(); const getText = useSettingsStore(state => state.getText); const displayItems = testimonials.length > 0 ? testimonials.map((t, idx) => ({ id: t.id || `t-${idx}`, title: t.clinicName ? `${t.vetName} — ${t.clinicName}` : t.vetName, doctor: t.vetName, duration: "۲:۰۰", thumbnail: t.imageUrl || "https://images.unsplash.com/photo-1576091160550-217359f42f8c?auto=format&fit=crop&q=80&w=400", videoUrl: "https://www.w3schools.com/html/mov_bbb.mp4", description: t.quote, quote: t.quote })) : VIDEOS; const [selectedVideo, setSelectedVideo] = useState(null); return (
{getText('videos_badge', "Vet Insights")}

{getText('videos_title', "مشاوره ویدئویی")} {getText('videos_title_highlight', "دوست دامپزشک پت شما")}

{getText('videos_desc', "تیم علمی و فرموله‌کنندگان کمپانی کانینا در آلمان مستقیماً با شما صحبت می‌کنند؛ آشنایی با نحوه مصرف، مزایای بالینی و دانش پزشکی پشت هر محصول.")}

{getText('videos_view_all', "مشاهده همه ویدئوها")}
{displayItems.map((video: any, index: number) => ( setSelectedVideo(video)} className="w-full text-right block group cursor-pointer focus-visible:ring-4 focus-visible:ring-canina-blue/30 focus-visible:outline-none rounded-[2rem] p-2" >
⏱️ {video.duration || (index === 0 ? '۱:۴۵' : index === 1 ? '۲:۲۰' : '۳:۱۰')}

{video.title || video.quote?.substring(0, 40) + '...'}

{video.doctor || video.vetName}
))}
{/* Video Modal */} {selectedVideo && (
setSelectedVideo(null)} className="absolute inset-0 bg-medical-gray-900/90 backdrop-blur-xl" />
)}
); }