import type { ReactNode } from 'react'; import { ArLaunchButton } from '~/components/ui/ar-launch-button'; import { ArPageHeader } from '~/components/ui/ar-page-header'; import { AR_PAGE_DEFAULTS } from '~/data/projects/constants'; import { cn } from '~/lib/utils'; import type { ArPageLayout, BrandIdentity, ButtonStyle } from '~/types/project'; // Over the model: placed at an edge, and only the button itself takes touches so the model can still be turned const overlay = (edge: 'top-0' | 'bottom-0') => cn('pointer-events-none absolute inset-x-0 z-10', edge); interface ArPageProps { brand?: BrandIdentity; modelName: string; button?: ButtonStyle; layout?: ArPageLayout; launching?: boolean; hint?: string | null; onLaunch?: () => void; className?: string; children: ReactNode; } // The customer-facing AR page layout, shared by the live page and the admin previews. // With the bars off, the model fills the page and the header and button sit over it. export function ArPage({ brand, modelName, button, layout = AR_PAGE_DEFAULTS, launching, hint, onLaunch, className, children }: ArPageProps) { const bars = layout.bars; return (