import { Link, useLocation } from 'react-router-dom'; import { Clock, MapPin, Navigation, Phone } from 'lucide-react'; import { useCookieConsent } from '../context/CookieConsentContext.jsx'; import { useSiteSettings } from '../context/SiteSettingsContext.jsx'; import { useLanguage } from '../context/LanguageContext.jsx'; import { isOpenNow, formatBusinessHours } from '../utils/businessHours.js'; const digitsOnly = (value) => (value || '').replace(/[^\d+]/g, ''); export default function Footer() { const { phone, contact_email: contactEmail, address_street: addressStreet, address_zip: addressZip, address_city: addressCity, business_hours: businessHours, has_downloads: hasDownloads, } = useSiteSettings(); const open = isOpenNow(businessHours); const { openSettings } = useCookieConsent(); // Auf der Startseite blendet sich unten eine fixierte CTA-Leiste ein, die // sonst die letzte Footer-Zeile (Impressum-Links) verdeckt - deshalb dort // zusätzlichen Platz für sie freihalten. const { pathname } = useLocation(); const isHome = pathname === '/'; const { t } = useLanguage(); const shopAddress = [addressStreet, [addressZip, addressCity].filter(Boolean).join(' ')] .filter(Boolean) .join(', '); const directionsUrl = `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(shopAddress)}`; const HOURS = formatBusinessHours(businessHours, t('footer.closed')); return ( ); }