'use client'; import { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; import { Container } from '@/components/ui/Container'; import { Button } from '@/components/ui/Button'; import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay'; import { AnimatedGlossyBorder } from '@/components/ui/AnimatedGlossyBorder'; import { FileText, Award, Download, ShieldCheck } from 'lucide-react'; import { LogoArcs } from '@/components/ui/LogoArcs'; interface Certificate { title: string; description: string; pdfUrl?: string; type: 'iso' | 'tax' | 'general'; date?: string; } interface CertificatesBlockProps { badge?: string; title?: string; description?: string; certificates?: Certificate[]; hideHeader?: boolean; } const defaultCertificates: Certificate[] = [ { title: 'ISO 14001:2015', description: 'Umweltmanagementsystem', pdfUrl: '/assets/certificates/iso14001.pdf', type: 'iso', date: '14.12.2023', }, { title: 'ISO 9001:2015', description: 'Qualitätsmanagementsystem', pdfUrl: '/assets/certificates/iso9001.pdf', type: 'iso', date: '14.12.2023', }, { title: 'DIN EN ISO 45001:2018', description: 'Arbeits- und Gesundheitsschutz', pdfUrl: '/assets/certificates/iso45001.pdf', type: 'iso', date: '05.12.2025', }, { title: 'Freistellungsbescheinigung', description: 'Nach § 48 b EStG', pdfUrl: '/assets/certificates/freistellung.pdf', type: 'tax', date: '09.02.2024', }, { title: 'Nachweis § 13b UStG', description: 'Steuerschuldnerschaft des Leistungsempfängers', pdfUrl: '/assets/certificates/nachweis13b.pdf', type: 'tax', date: '09.02.2024', }, { title: 'Bescheinigung in Steuersachen', description: 'Zertifikat des Finanzamtes', pdfUrl: '/assets/certificates/bescheinigung.pdf', type: 'tax', date: '13.02.2025', }, { title: 'Unbedenklichkeit IHK', description: 'Industrie- und Handelskammer', type: 'general', }, { title: 'Unbedenklichkeit HWK', description: 'Handwerkskammer', type: 'general', }, { title: 'Handelsregisterauszug', description: 'Amtsgericht Cottbus', type: 'general', }, { title: 'Gewerbe-Anmeldung', description: 'Stadt Guben', type: 'general', }, { title: 'Gewerbezentralregister', description: 'Auskunft aus dem Register', type: 'general', }, ]; export function CertificatesBlock({ badge, title, description, certificates = defaultCertificates, hideHeader = false }: CertificatesBlockProps) { const [isMounted, setIsMounted] = useState(false); useEffect(() => { setIsMounted(true); }, []); const badgeText = badge || 'Zertifizierungen & Nachweise'; const titleText = title || 'Geprüfte Qualität und Sicherheit'; const descriptionText = description || 'Transparenz und höchste Standards sind das Fundament unserer Arbeit. Hier finden Sie unsere aktuellen Zertifikate und Bescheinigungen als PDF-Download.'; const containerVariants = { hidden: { opacity: 0 }, show: { opacity: 1, transition: { staggerChildren: 0.1, }, }, }; const itemVariants = { hidden: { opacity: 0, y: 20 }, show: { opacity: 1, y: 0, transition: { duration: 0.5, ease: 'easeOut' as const } }, }; if (!isMounted) { return ( {!hideHeader && ( {badgeText} {titleText} {descriptionText} )} ); } return ( {/* Background Accents */} {!hideHeader && ( {badgeText} {titleText} {descriptionText} )} {certificates.map((cert, index) => { const isIso = cert.type === 'iso'; const Wrapper = cert.pdfUrl ? motion.a : motion.div; const wrapperProps = cert.pdfUrl ? { href: encodeURI(cert.pdfUrl), target: "_blank", rel: "noopener noreferrer" } : {}; return ( {/* Background Decorative Elements */} {isIso && ( )} {isIso ? : } {cert.date && ( {cert.date} )} {cert.title} {cert.description} {cert.pdfUrl ? ( <> Download PDF > ) : ( Nachweis liegt vor )} ); })} ); }
{descriptionText}
{cert.description}