'use client'; import React from 'react'; import Link from 'next/link'; import { Button } from '@/components/ui/Button'; import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay'; import { m } from 'framer-motion'; import { useTranslations } from 'next-intl'; export interface JobListingBlockProps { title?: string; showJobs?: boolean; showFairs?: boolean; fairsTitle?: string; fairs?: Array<{ name: string; date: string; type: string; location?: string; booth?: string; url?: string; }>; emptyStateMessage?: string; emptyStateLinkText?: string; emptyStateLinkHref?: string; } const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.15, delayChildren: 0.1, }, }, }; const itemVariants = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 1.0, ease: [0.16, 1, 0.3, 1] as const }, }, }; export const JobListingBlock = (props: JobListingBlockProps) => { const t = useTranslations('JobListingBlock'); const { showJobs = true, showFairs, fairsTitle = t('fairsTitle'), fairs = [ { name: 'Intersolar München', date: 'Termin folgt', type: 'Energie-Messe', location: 'Messe München' }, { name: 'Windenergietage Linstow', date: 'Termin folgt', type: 'Fachkongress', location: 'Linstow' }, { name: 'Kabelwerkstatt Wiesbaden', date: 'Termin folgt', type: 'Fachmesse', location: 'Wiesbaden' } ], emptyStateMessage = t('emptyStateMessage'), emptyStateLinkText = t('emptyStateLinkText'), emptyStateLinkHref = t('emptyStateLinkHref') } = props; const title = props.title || t('title'); // Since Payload is removed, we use an empty array or static data const jobs: any[] = []; return (
{showFairs && (
{fairsTitle} {fairs.map((messe, idx) => { const isLink = !!messe.url; const innerContent = ( <> {/* Glass Background Elements */}
{messe.type}
{isLink && (
)}

{messe.name}

{t('date')}

{messe.date}

{messe.location && (

{t('location')}

{messe.location}

)} {messe.booth && (

{t('booth')}

{messe.booth}

)}
); const baseClasses = "group relative bg-[#050B14] rounded-[2rem] p-8 overflow-hidden border border-white/5 shadow-2xl transition-all duration-500 hover:scale-[1.02] hover:shadow-primary/10 flex flex-col h-full"; if (isLink) { return ( {innerContent} ); } return ( {innerContent} ); })}
)} {showJobs && (
{title} {jobs.length > 0 ? ( {jobs.map((job: any) => (
{job.type} {job.department}

{job.title}

{job.location}

{t('viewDetails')}
))}
) : (

{emptyStateMessage}

)}
)}
); };