import type { MouseEvent } from 'react' import { isWithinBusinessHours } from '../../shared/business-hours' import { contacts } from '../data/content' import { reportCallClick } from '../lib/lead' import { Container } from './Layout' export function SiteFooter({ onAfterHoursCall }: { onAfterHoursCall: () => void }) { // Nobody answers out of hours, so the number opens the callback form instead // of the dialler — and is not reported as a call, since none happens. function onPhoneClick(event: MouseEvent) { if (isWithinBusinessHours()) { reportCallClick() return } event.preventDefault() onAfterHoursCall() } return ( ) }