"use client"; import { useTranslations } from 'next-intl'; import { motion } from 'framer-motion'; import { Calendar, Music, Disc3, CalendarDays, Zap, GlassWater } from 'lucide-react'; /* ── static data ───────────────────────────────── */ const WEEK_DAYS = ['Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt', 'Paz']; const ACTIVE_DAYS: Record = { 3: '#FF5A36', 4: '#00E5FF', 5: '#00E5FF', }; /* ── types ─────────────────────────────────────── */ type EventItem = { id: string; title: string; time: string; tag: string; iconType: string; colorTheme: string; isFeatured: boolean; }; /* ── sub-components ────────────────────────────── */ function VinylDisc() { return ( {/* Grooves */} {[55, 45, 35].map((size) => (
))} {/* Label */}
); } function EqBars({ color }: { color: string }) { const heights = [0.4, 0.8, 0.5, 1, 0.65, 0.9, 0.45, 0.75, 0.55, 0.85]; return (
{heights.map((h, i) => ( 0.6 ? 0.2 : 1, h] }} transition={{ duration: 0.5 + Math.random() * 0.4, repeat: Infinity, repeatType: 'mirror', delay: i * 0.07, ease: 'easeInOut', }} /> ))}
); } function WineGlassIcon() { return ( ); } /* ── main component ────────────────────────────── */ export default function Events({ dbEvents = [] }: { dbEvents?: any[] }) { const t = useTranslations('Events'); // Hardcoded fallback data if db is empty const defaultEvents: EventItem[] = dbEvents.length > 0 ? dbEvents : [ { id: "fallback-1", title: t('cards.dj.title'), time: t('cards.dj.time'), tag: "EN POPÜLER", iconType: "dj", colorTheme: "cyan", isFeatured: true, }, { id: "fallback-2", title: t('cards.raki.title'), time: t('cards.raki.time'), tag: "PER", iconType: "glass", colorTheme: "coral", isFeatured: false, }, { id: "fallback-3", title: t('cards.live_music.title'), time: t('cards.live_music.time'), tag: "★ ÖZEL", iconType: "music", colorTheme: "amber", isFeatured: false, } ]; const featuredEvent = defaultEvents.find(e => e.isFeatured) || defaultEvents[0]; const secondaryEvents = defaultEvents.filter(e => e.id !== featuredEvent.id); // Tema renklerini almak için yardımcı fonksiyon const getThemeColor = (theme: string) => { switch (theme) { case 'cyan': return '#00E5FF'; case 'coral': return '#FF5A36'; case 'amber': return '#FFA827'; default: return '#00E5FF'; } }; const getThemeColors = (theme: string) => { switch (theme) { case 'cyan': return { main: '#00E5FF', bg: '#00E5FF1A', borderSpin: 'border-spin-cyan', darkBg: '#0C1828' }; case 'coral': return { main: '#FF5A36', bg: '#FF5A361A', borderSpin: 'border-spin-coral', darkBg: '#0C0808', hoverBg: '#110a0a' }; case 'amber': return { main: '#FFA827', bg: '#FFA8271A', borderSpin: 'border-spin-amber', darkBg: '#0C0A04', hoverBg: '#110d04' }; default: return { main: '#00E5FF', bg: '#00E5FF1A', borderSpin: 'border-spin-cyan', darkBg: '#0C1828', hoverBg: '#0C1828' }; } }; // İkon bileşenini render etme yardımcı fonksiyonu const renderIcon = (type: string, size: number = 22) => { switch(type) { case 'dj': return ; case 'glass': return ; case 'music': return ; default: return ; } }; return (
{/* Aurora background blobs */}
{/* Fine dot grid */}
{/* ── Header ───────────────────────────────── */}
Live Events

{t('title')}

{t('description')}

{t('view_calendar')}
{/* ── Weekly schedule bar ───────────────────── */} {WEEK_DAYS.map((day, i) => { const accent = ACTIVE_DAYS[i]; const isActive = !!accent; return (
{day}
); })} {/* ── Featured Event (Dinamic) ────────────── */} {featuredEvent && (() => { const c = getThemeColors(featuredEvent.colorTheme); return (
{/* Glow center */}
{/* Left: text */}
{featuredEvent.tag}
{featuredEvent.time}

{featuredEvent.title}

{renderIcon(featuredEvent.iconType, 18)}
Open-air · Beach Stage
{/* Right: vinyl */}
); })()} {/* ── Secondary events: 2-col grid (Dinamic) ─────────── */} {secondaryEvents.length > 0 && (
{secondaryEvents.map((evt, i) => { const c = getThemeColors(evt.colorTheme); return (
{renderIcon(evt.iconType, 22)}
{evt.tag}

{evt.title}

{evt.time}
); })}
)}
{/* Wave → sand */}
); }