import React from 'react' import type { ReactNode } from 'react' import { Link, useLocation } from 'react-router-dom' import { useLegacyThemePage, usePageContext } from '../shared/pageContext' import { AppLogo } from '../components/common/AppLogo' import { LocaleSwitcher } from '../components/common/LocaleSwitcher' type PublicLayoutProps = { children: ReactNode footer?: boolean variant?: 'demo' | 'live' profilePath?: string simulationPath?: string bookingUrl?: string } function PublicHeader({ variant = 'demo', profilePath: profilePathOverride, simulationPath, bookingUrl, }: Omit) { const { path, copy } = usePageContext() const location = useLocation() const profilePath = profilePathOverride || path('/profile') const customerSimulationPath = simulationPath || path('/customer-simulation') const isCustomerSimulation = location.pathname.startsWith(path('/customer-simulation')) const pageCopy = copy.publicLayout const navCopy = pageCopy.nav return (
) } export function PublicLayout({ children, footer = true, variant = 'demo', profilePath, simulationPath, bookingUrl, }: PublicLayoutProps) { useLegacyThemePage({ bodyClassName: '', mobileNavStyle: 'classic' }) const { copy } = usePageContext() return ( <> {children} {footer ? ( ) : null} ) }