import type { FAQItem } from "@/lib/types"; import type { Metadata } from "next"; import Image from "next/image"; import Link from "next/link"; import { ArrowRight, Check, CheckCircle2, Compass, Link2, Radar, Smartphone, RefreshCw, BarChart3, Utensils, ChevronRight, ShieldCheck, Zap, } from "lucide-react"; import Breadcrumbs, { BreadcrumbItem } from "@/components/Breadcrumbs"; import SeoJsonLd from "@/components/SeoJsonLd"; import { FAQSection } from "@/components/aeo/FAQSection"; import { MarketingPageTracker, TrackedCtaLink, } from "@/components/marketing/MarketingAnalytics"; import { AnswerFirstBlock } from "@/components/marketing/AnswerFirstBlock"; import { Button } from "@/components/ui/Button"; import { Card } from "@/components/ui/Card"; import { HeroSpotlight } from "@/components/marketing/HeroSpotlight"; import { breadcrumbSchema, faqPageSchema } from "@/lib/schema"; type LinkCard = { href: string; title: string; description: string; }; type UseCasePageTemplateProps = { title: string; description: string; eyebrow: string; intro: string; pageType: "commercial" | "use_case"; cluster: string; useCase?: string; breadcrumbs: BreadcrumbItem[]; answer: string; whenToUse: string[]; comparisonItems: { label: string; value: boolean; text?: string; }[]; howToSteps: string[]; primaryCta: { href: string; label: string; }; secondaryCta: { href: string; label: string; }; workflowTitle: string; workflowIntro: string; workflowCards: { title: string; description: string; }[]; checklistTitle: string; checklist: string[]; supportLinks: LinkCard[]; faq: FAQItem[]; heroImage?: string; heroImageAlt?: string; authoritySignals?: string[]; directAnswer?: string; schemaData?: Record[]; }; export function buildUseCaseMetadata({ title, description, canonicalPath, }: { title: string; description: string; canonicalPath: string; }): Metadata { const canonical = `https://www.qrmaster.net${canonicalPath}`; return { title: { absolute: `${title} | QR Master`, }, description, alternates: { canonical, languages: { "x-default": canonical, en: canonical, }, }, openGraph: { title: `${title} | QR Master`, description, url: canonical, type: "website", images: ["/og-image.png"], }, twitter: { title: `${title} | QR Master`, description, }, }; } function getWorkflowIcon(index: number) { switch (index) { case 0: return Smartphone; case 1: return RefreshCw; case 2: return BarChart3; default: return Radar; } } function RestaurantMockup() { return (
{/* Subtle flat shadow under elements */}
{/* Table stand card (Flat vector look) */}
{/* Table number / header */}
Bistro
T-12
{/* Scan instruction */}

Scan for Menu

{/* Flat QR Code */}
{/* Finder Pattern Top-Left */} {/* Finder Pattern Top-Right */} {/* Finder Pattern Bottom-Left */} {/* Align Pattern Bottom-Right */} {/* Timing patterns */} {/* Random data blocks */}
{/* Stand base detail */}
{/* Smartphone (Flat vector look) */}
{/* Dynamic Island */}
{/* Smartphone Screen Content */}
{/* Custom menu header */}
Bistro Active Menu
{/* Menu List */}
{/* Menu Item 1 */}
Charred Ribeye $34

Rosemary butter

{/* Menu Item 2 */}
Mushroom Pasta $22

Fresh fettuccine

{/* Menu Item 3 */}
Crème Brûlée $11

Peach & vanilla

{/* Cart Button */}
$56.00
{/* Flat Connecting Line (Blueprint look, dipped downward further) */}
); } function GenericMockup() { return (
{/* Subtle flat shadow under elements */}
{/* Flat Dashboard Card */}
Overview
Active
Scans

8,421

Conversion

14.2%

{/* Mini Chart */}
Activity
{[30, 45, 25, 60, 80, 50, 75].map((val, idx) => (
))}
{/* Smartphone (Flat vector look) */}
{/* Dynamic Island */}
{/* Screen */}
Redirecting
redirecting to URL...
); } export function UseCasePageTemplate({ title, description, eyebrow, intro, pageType, cluster, useCase, breadcrumbs, answer, whenToUse, comparisonItems, howToSteps, primaryCta, secondaryCta, workflowTitle, workflowIntro, workflowCards, checklistTitle, checklist, supportLinks, faq, heroImage, heroImageAlt = "QR code workflow example", authoritySignals = [], directAnswer, schemaData = [], }: UseCasePageTemplateProps) { return ( <>
{/* Pure white, highly polished, minimalist hero section with mouse tracking spotlight glow */}
Use Case

{title}

{intro}

{/* Sub-benefits (Styled as authentic, clean Framer-style Apple Notification banners) */}
{[ { title: "Print Stability", body: "Keep printed tables & flyers clean and permanent", icon: ShieldCheck }, { title: "Instant Redirection", body: "Update links instantly without reprinting codes", icon: RefreshCw }, { title: "Attribution Flows", body: "Built-in campaign tracking and flow analysis", icon: BarChart3 }, { title: "Mobile Optimized", body: "Designed to load fast on mobile data connections", icon: Zap }, ].map((item) => (
{item.title} now

{item.body}

))}
{/* Mockup visual wrapped in an elegant macOS-style window frame */}
{heroImage ? (
{/* Browser header controls */}
Setup Preview
{/* Visual Container */}
{heroImageAlt}
) : (
{useCase === 'restaurant-menu-qr-codes' ? ( ) : ( )}
)}
{/* AnswerFirst block - summary and quick details */}
{directAnswer ? (

{directAnswer}

{authoritySignals.length ? (
{authoritySignals.map((item) => (
{item}
))}
) : null}
) : null} {/* Workflow steps block */}

{workflowTitle}

{workflowIntro}

{workflowCards.map((card, idx) => { const Icon = getWorkflowIcon(idx); return (

{card.title}

{card.description}

); })}
{/* Symmetrical Checklist & Sibling resources section */}
{/* Checklist Card */}
Standard Guidelines

{checklistTitle}

    {checklist.map((item) => (
  • {item}
  • ))}
{/* Related links card (Clean white, matching checklist) */}

Related resources

{supportLinks.map((link) => (
{link.title}
{link.description}
))}
{/* FAQs */}
{/* Bottom CTA Banner (Flat light-gray card, no gradients) */}
Next step

Start with a QR setup that keeps your print permanent.

{description}

); }