export type DemoDriveLayoutPreview = "phone" | "tablet" | "desktop" export function getDemoDriveLayoutPreview(): DemoDriveLayoutPreview | null { if (typeof window === "undefined") return null if (!window.location.pathname.includes("/demo/drive")) return null const param = new URLSearchParams(window.location.search).get("preview") if (param === "phone" || param === "tablet" || param === "desktop") return param return null } export function demoDriveLayoutPreviewSrc(layout: DemoDriveLayoutPreview): string { return `/demo/drive?preview=${layout}` }