import { Link } from "react-router-dom";
import { ArrowRight, CheckCircle2, Globe, Monitor, Users, Presentation } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Layout } from "@/components/layout/Layout";
import { Section, SectionHeader } from "@/components/ui/Section";
import { SEO } from "@/components/SEO";
import { useTranslation } from "react-i18next";
import { useForceLanguage } from "@/hooks/useForceLanguage";
import { RelatedSolutions } from "@/components/RelatedSolutions";

import hexagonImage from "@/assets/cases/hexagon-showroom.jpg";
import envirotainerImage from "@/assets/cases/envirotainer-atlanta.jpg";
import samsungImage from "@/assets/cases/samsung-bmw.jpg";

interface VRShowroomProps {
  forceLang?: "sv" | "en";
}

export default function VRShowroom({ forceLang = "en" }: VRShowroomProps) {
  const { i18n } = useTranslation();
  useForceLanguage(forceLang);
  const isSwedish = i18n.language === "sv";

  const pageTitle = isSwedish
    ? "VR Showroom – Interaktiva 3D-showrooms för försäljning och produktdemos | Suteki Studios"
    : "VR Showrooms – Interactive 3D Showrooms for Sales & Product Demos | Suteki Studios";
  const pageDescription = isSwedish
    ? "Suteki Studios utvecklar interaktiva VR-showrooms för produktdemos, försäljning, mässor och globala presentationer."
    : "Suteki Studios builds interactive VR showrooms for product demos, sales enablement, trade shows, and global remote presentations.";

  const cases = [
    {
      client: "Hexagon Manufacturing Intelligence",
      title: isSwedish
        ? "Hexagon 3D Showroom – Interaktiv produktvisning i VR"
        : "Hexagon 3D Showroom – Interactive Product Showcase in VR",
      description: isSwedish
        ? "Suteki Studios utvecklade ett interaktivt 3D-showroom för Hexagon Manufacturing Intelligence, som möjliggör för globala säljteam att demonstrera komplexa industriprodukter i en immersiv VR-miljö – utan att behöva fysiska produkter eller resande."
        : "Suteki Studios developed an interactive 3D showroom for Hexagon Manufacturing Intelligence, enabling global sales teams to demonstrate complex industrial products in an immersive VR environment – without physical products or travel.",
      outcomes: isSwedish
        ? ["Global produktdemonstration utan resor", "Interaktiv 3D-navigering i realtid", "Förbättrad försäljningseffektivitet"]
        : ["Global product demonstration without travel", "Real-time interactive 3D navigation", "Improved sales effectiveness"],
      image: hexagonImage,
      href: "/cases/hexagon-3d-showroom",
    },
    {
      client: "Envirotainer",
      title: isSwedish
        ? "Envirotainer Atlanta – VR-showroom för kylkedjelösningar"
        : "Envirotainer Atlanta – VR Showroom for Cold Chain Solutions",
      description: isSwedish
        ? "Suteki Studios skapade ett VR-showroom för Envirotainer vid deras anläggning i Atlanta, USA. Showroomet gör det möjligt för kunder att utforska Envirotainers kylkedjecontainrar i full skala, inklusive tekniska specifikationer och operativa scenarier."
        : "Suteki Studios created a VR showroom for Envirotainer at their Atlanta facility, USA. The showroom enables customers to explore Envirotainer's cold chain containers at full scale, including technical specifications and operational scenarios.",
      outcomes: isSwedish
        ? ["Fysiskt showroom ersatt med VR", "Kompletta produktdemos på plats", "Skalbart globalt säljstöd"]
        : ["Physical showroom replaced with VR", "Complete on-site product demos", "Scalable global sales support"],
      image: envirotainerImage,
      href: "/cases/envirotainer-vr-academy",
    },
    {
      client: "Samsung × BMW",
      title: isSwedish
        ? "Samsung × BMW – Immersiv VR-upplevelse för premium retail"
        : "Samsung × BMW – Immersive VR Experience for Premium Retail",
      description: isSwedish
        ? "En gemensam VR-upplevelse utvecklad för Samsung och BMW, som visades i Samsung-butiker. Upplevelsen placerade användare i en virtuell BMW-miljö med full interaktivitet, som demonstrerade hur VR kan förstärka premiumretail och varumärkesupplevelser."
        : "A collaborative VR experience developed for Samsung and BMW, showcased in Samsung retail stores. The experience placed users in a virtual BMW environment with full interactivity, demonstrating how VR can enhance premium retail and brand experiences.",
      outcomes: isSwedish
        ? ["Cross-brand VR-upplevelse", "Premium retail-integration", "Ökat varumärkesengagemang"]
        : ["Cross-brand VR experience", "Premium retail integration", "Increased brand engagement"],
      image: samsungImage,
      href: "/cases/samsung-bmw-vr-experience",
    },
  ];

  const useCases = [
    {
      icon: Presentation,
      title: isSwedish ? "Produktdemos" : "Product Demos",
      description: isSwedish
        ? "Visa komplexa produkter i full skala utan fysiska prototyper eller transporter."
        : "Showcase complex products at full scale without physical prototypes or shipping.",
    },
    {
      icon: Users,
      title: isSwedish ? "Försäljningsstöd" : "Sales Enablement",
      description: isSwedish
        ? "Ge säljteam interaktiva verktyg som förstärker kundpresentationer och förkortar säljcykler."
        : "Equip sales teams with interactive tools that enhance client presentations and shorten sales cycles.",
    },
    {
      icon: Monitor,
      title: isSwedish ? "Mässor & Event" : "Trade Shows & Events",
      description: isSwedish
        ? "Skapa uppmärksamhetsfångande VR-upplevelser som skiljer er monter från konkurrenterna."
        : "Create attention-grabbing VR experiences that set your booth apart from competitors.",
    },
    {
      icon: Globe,
      title: isSwedish ? "Globalt fjärrshowroom" : "Global Remote Showroom",
      description: isSwedish
        ? "Demonstrera produkter för kunder världen över utan att lämna kontoret."
        : "Demonstrate products to clients worldwide without leaving the office.",
    },
  ];

  return (
    <Layout>
      {isSwedish ? (
        <SEO
          title="VR Showroom för produktpresentationer | Suteki Studios"
          description="Visa produkter och miljöer i virtuell verklighet. Engagerande VR-showrooms för mässor, sälj och event."
          lang="sv"
          canonicalUrl="https://sutekistudios.com/vr-showroom"
          alternateSv="https://sutekistudios.com/vr-showroom"
          alternateEn="https://sutekistudios.com/vr-showrooms"
        />
      ) : (
        <SEO
          title="VR Showrooms for Product Presentations | Suteki Studios"
          description="Present products and environments in virtual reality. Engaging VR showrooms for trade shows, sales and events."
          lang="en"
          canonicalUrl="https://sutekistudios.com/vr-showrooms"
          alternateSv="https://sutekistudios.com/vr-showroom"
          alternateEn="https://sutekistudios.com/vr-showrooms"
        />
      )}

      {/* Hero */}
      <Section className="pt-32 relative overflow-hidden" data-hero="true">
        <div
          className="absolute inset-0 bg-cover bg-center bg-no-repeat"
          style={{ backgroundImage: `url(${hexagonImage})` }}
        />
        <div className="absolute inset-0" style={{ background: 'linear-gradient(90deg, rgba(11,18,32,0.70) 0%, rgba(11,18,32,0.35) 55%, rgba(11,18,32,0.15) 100%)' }} />
        <div className="relative z-10 max-w-3xl">
          <p className="hero-eyebrow mb-4 tracking-wider">
            {isSwedish ? "VR SHOWROOM" : "VR SHOWROOMS"}
          </p>
          <h1 className="text-4xl md:text-5xl lg:text-6xl font-semibold tracking-tight mb-6">
            {isSwedish
              ? "Interaktiva 3D-showrooms som ersätter fysiska begränsningar"
              : "Interactive 3D Showrooms That Replace Physical Limitations"}
          </h1>
          <p className="text-lg md:text-xl text-muted-foreground mb-8">
            {isSwedish
              ? "Suteki Studios utvecklar VR-showrooms som gör det möjligt att demonstrera produkter, miljöer och koncept i full skala – utan fysiska prototyper, transporter eller geografiska begränsningar."
              : "Suteki Studios develops VR showrooms that enable demonstrations of products, environments, and concepts at full scale – without physical prototypes, shipping, or geographic limitations."}
          </p>
          <div className="flex flex-col sm:flex-row gap-4">
            <Button size="lg" asChild>
              <a href="https://calendly.com/sutekistudios/strategic-project-discussion" target="_blank" rel="noopener noreferrer">
                {isSwedish ? "Boka ett möte" : "Book a Meeting"}
                <ArrowRight className="ml-2 h-4 w-4" />
              </a>
            </Button>
            <Button size="lg" variant="outline" asChild>
              <Link to="/cases">
                {isSwedish ? "Se case" : "View Cases"}
              </Link>
            </Button>
          </div>
        </div>
      </Section>

      {/* Use Cases */}
      <Section className="bg-background">
        <SectionHeader
          title={isSwedish ? "Användningsområden" : "Use Cases"}
          subtitle={isSwedish
            ? "VR-showrooms skapar värde i flera kommersiella och operativa sammanhang."
            : "VR showrooms create value across multiple commercial and operational contexts."}
        />
        <div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-6">
          {useCases.map((uc) => {
            const Icon = uc.icon;
            return (
              <div key={uc.title} className="p-6 rounded-lg border border-border/50 bg-card">
                <Icon className="h-6 w-6 text-primary mb-3" />
                <h3 className="font-semibold mb-2">{uc.title}</h3>
                <p className="text-sm text-muted-foreground leading-relaxed">{uc.description}</p>
              </div>
            );
          })}
        </div>
      </Section>

      {/* Cases */}
      <Section className="bg-card">
        <SectionHeader
          title={isSwedish ? "Levererade VR-showrooms" : "Delivered VR Showrooms"}
        />
        <div className="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
          {cases.map((c) => (
            <div key={c.client} className="rounded-lg border border-border/60 bg-background overflow-hidden">
              <div className="aspect-video overflow-hidden">
                <img src={c.image} alt={c.title} loading="lazy" decoding="async" className="w-full h-full object-cover" />
              </div>
              <div className="p-6">
                <p className="text-xs text-muted-foreground uppercase tracking-wider mb-1">{c.client}</p>
                <h3 className="text-lg font-semibold mb-3">{c.title}</h3>
                <p className="text-sm text-muted-foreground mb-4">{c.description}</p>
                <ul className="space-y-1 mb-4">
                  {c.outcomes.map((o, i) => (
                    <li key={i} className="flex items-center gap-2 text-sm">
                      <CheckCircle2 className="h-4 w-4 text-primary flex-shrink-0" />
                      <span className="text-muted-foreground">{o}</span>
                    </li>
                  ))}
                </ul>
                <Link to={c.href} className="text-sm font-medium text-primary hover:text-primary/80 inline-flex items-center gap-1">
                  {isSwedish ? "Visa case →" : "View case →"}
                </Link>
              </div>
            </div>
          ))}
        </div>
      </Section>

      {/* Combine with AI & Hologram */}
      <Section className="bg-background">
        <div className="max-w-3xl mx-auto text-center">
          <h2 className="text-2xl md:text-3xl font-semibold mb-4">
            {isSwedish ? "Kombinera med AI-avatarer och hologram" : "Combine with AI Avatars and Holograms"}
          </h2>
          <p className="text-muted-foreground mb-8">
            {isSwedish
              ? "VR-showrooms blir ännu kraftfullare i kombination med AI-drivna avatarer för guidad navigation eller holografiska produktvisningar. Suteki Studios designar integrerade upplevelser som förenar VR, AI och hologram i en sömlös lösning."
              : "VR showrooms become even more powerful when combined with AI-driven avatars for guided navigation or holographic product displays. Suteki Studios designs integrated experiences that unite VR, AI, and holograms in a seamless solution."}
          </p>
          <div className="flex flex-col sm:flex-row gap-4 justify-center">
            <Button variant="outline" asChild>
              <Link to={isSwedish ? "/ai-losningar" : "/ai"}>
                {isSwedish ? "AI-lösningar →" : "AI Solutions →"}
              </Link>
            </Button>
            <Button variant="outline" asChild>
              <Link to={isSwedish ? "/hologramlosningar" : "/hologram"}>
                {isSwedish ? "Hologramlösningar →" : "Hologram Solutions →"}
              </Link>
            </Button>
          </div>
        </div>
      </Section>

      <RelatedSolutions excludeHrefs={["/vr-showroom", "/vr-showrooms"]} />

      {/* CTA */}
      <Section className="bg-card">
        <div className="max-w-3xl mx-auto text-center">
          <h2 className="text-3xl md:text-4xl font-semibold mb-4">
            {isSwedish ? "Redo att bygga ert VR-showroom?" : "Ready to Build Your VR Showroom?"}
          </h2>
          <p className="text-lg text-muted-foreground mb-8">
            {isSwedish
              ? "Boka ett strategiskt möte för att diskutera hur ett interaktivt VR-showroom kan stödja era försäljnings- och presentationsbehov."
              : "Book a strategic meeting to discuss how an interactive VR showroom can support your sales and presentation needs."}
          </p>
          <Button size="lg" asChild>
            <a href="https://calendly.com/sutekistudios/strategic-project-discussion" target="_blank" rel="noopener noreferrer">
              {isSwedish ? "Boka möte" : "Book a Meeting"}
              <ArrowRight className="ml-2 h-4 w-4" />
            </a>
          </Button>
        </div>
      </Section>
    </Layout>
  );
}
