import type { Metadata } from "next" import Link from "next/link" import { ArrowRight, Clock, Globe, Mail, MapPin, Phone, Wrench, } from "lucide-react" import { Breadcrumbs } from "@/components/breadcrumbs" import { ReviewsSection } from "@/components/reviews-section" import { GetFreeMachineCta } from "@/components/get-free-machine-cta" import { PublicInset, PublicPageHeader, PublicSurface, } from "@/components/public-surface" import type { LocationData } from "@/lib/location-data" import { generateSEOMetadata } from "@/lib/seo" import { buildAbsoluteUrl, buildLocationRoute } from "@/lib/seo-registry" import { businessConfig } from "@/lib/seo-config" const SALT_LAKE_COUNTY = new Set([ "salt-lake-city-utah", "sandy-utah", "draper-utah", "murray-utah", "midvale-utah", "south-salt-lake-utah", "west-valley-city-utah", "west-jordan-utah", "south-jordan-utah", "riverton-utah", "herriman-utah", "holladay-utah", "millcreek-utah", "cottonwood-heights-utah", ]) const DAVIS_COUNTY = new Set([ "ogden-utah", "layton-utah", "clearfield-utah", "syracuse-utah", "clinton-utah", ]) function getCountyName(locationSlug: string) { if (SALT_LAKE_COUNTY.has(locationSlug)) { return "Salt Lake County" } if (DAVIS_COUNTY.has(locationSlug)) { return "Davis County" } return "Utah County" } function getIndustryFocus(locationData: LocationData) { const county = getCountyName(locationData.slug) const countyIndustries: Record = { "Salt Lake County": [ "offices", "warehouses", "gyms", "schools", "service businesses", ], "Davis County": [ "warehouses", "auto repair shops", "community centers", "schools", "offices", ], "Utah County": [ "offices", "training spaces", "schools", "fitness locations", "community facilities", ], } return Array.from( new Set([locationData.anecdote.customer, ...countyIndustries[county]]) ).slice(0, 5) } export function generateLocationPageMetadata( locationData: LocationData ): Metadata { return generateSEOMetadata({ title: `Vending Machines in ${locationData.city}, ${locationData.stateAbbr}`, description: `Rocky Mountain Vending provides free placement for qualifying locations, machine sales, repairs, and vending service for businesses in ${locationData.city}, ${locationData.stateAbbr}. Explore local coverage and contact options.`, path: buildLocationRoute(locationData.slug), keywords: [ `vending machines ${locationData.city.toLowerCase()}`, `vending machine repair ${locationData.city.toLowerCase()}`, `vending service ${locationData.city.toLowerCase()}`, `${locationData.city.toLowerCase()} vending company`, ...locationData.neighborhoods.map( (neighborhood) => `vending machines ${neighborhood.toLowerCase()}` ), ], }) } export function LocationLandingPage({ locationData, }: { locationData: LocationData }) { const isSaltLakeCity = locationData.slug === "salt-lake-city-utah" const countyName = getCountyName(locationData.slug) const industries = getIndustryFocus(locationData) const canonicalUrl = buildAbsoluteUrl(buildLocationRoute(locationData.slug)) const title = `Vending Machines in ${locationData.city}, ${locationData.stateAbbr}` const description = `Rocky Mountain Vending provides free placement for qualifying locations, machine sales, repairs, and vending service for businesses in ${locationData.city}, ${locationData.stateAbbr}.` const comparisonRows = [ ["Credit card readers", "Yes", "Maybe", "Yes"], ["Locally owned", "Yes", "Yes", "Maybe"], ["Fast service", "Yes", "Maybe", "Maybe"], ["Large selection of products", "Yes", "Maybe", "Yes"], ["Quality of equipment used", "Excellent", "Varies", "Excellent"], ["Locked into Coke or Pepsi equipment", "No", "Maybe", "Probably"], ] const saltLakeServiceLinks = [ { title: "Traditional snacks and drinks", body: "Stock the machine with the classic snacks, sodas, and convenience items most locations still want every day.", href: "/food-and-beverage/traditional-options", }, { title: "Healthy snacks and drinks", body: "Offer protein bars, better-for-you snacks, and drink choices that fit health-conscious teams and customers.", href: "/food-and-beverage/healthy-options", }, { title: "Snack and drink delivery", body: "Need product delivery or a broader refreshment setup beyond standard machine placement? We can help there too.", href: "/food-and-beverage/snack-and-drink-delivery", }, { title: "Vending machine sales", body: "Compare purchase options if you want equipment ownership instead of a free-placement arrangement.", href: "/vending-machines/machines-for-sale", }, { title: "Parts, repairs, and moving", body: "Get support for repair work, machine moving, replacement parts, and operational issues that need direct service help.", href: "/services/parts", }, { title: "Training and support", body: "Browse the support pages and machine guides if you need help with specific models, manuals, or machine operation questions.", href: "/blog", }, ] const structuredData = { "@context": "https://schema.org", "@graph": [ { "@type": "WebPage", name: title, description, url: canonicalUrl, isPartOf: { "@type": "WebSite", name: businessConfig.name, url: businessConfig.website, }, }, { "@type": "Service", name: `${businessConfig.name} vending services in ${locationData.city}, ${locationData.stateAbbr}`, description, url: canonicalUrl, serviceType: "Free vending machine placement, vending machine sales, repairs, parts, moving, and ongoing service", provider: { "@type": "Organization", name: businessConfig.name, url: businessConfig.website, telephone: businessConfig.phoneFormatted, email: businessConfig.email, }, areaServed: { "@type": "City", name: locationData.city, containedInPlace: { "@type": "AdministrativeArea", name: countyName, }, address: { "@type": "PostalAddress", addressLocality: locationData.city, addressRegion: locationData.stateAbbr, postalCode: locationData.zipCode, addressCountry: "US", }, }, }, ], } return ( <>