import { Link } from "react-router-dom";
import { ArrowRight, CheckCircle2 } from "lucide-react";
import { Layout } from "@/components/layout/Layout";
import { SEO } from "@/components/SEO";
import { useTranslation } from "react-i18next";
import { useForceLanguage } from "@/hooks/useForceLanguage";
import { RelatedSolutions } from "@/components/RelatedSolutions";
import mcdonaldsImage from "@/assets/cases/mcdonalds-case.jpg";

interface AIAutomationEnterpriseProps { forceLang?: "sv" | "en"; seoOverride?: React.ReactNode; }

export default function AIAutomationEnterprise({ forceLang, seoOverride }: AIAutomationEnterpriseProps) {
  const { i18n } = useTranslation();
  useForceLanguage(forceLang);
  const isSwedish = i18n.language === "sv";

  const cases = [
    { client: "McDonald's Scandinavia", title: isSwedish ? "AI-automation med 260% ROI" : "AI Automation with 260% ROI", description: isSwedish ? "AI-baserat automationssystem som ersatte manuell finansiell rapportering. Levererade realtidsdataflöden utan fel." : "AI-based automation system replacing manual financial reporting. Delivered real-time, error-free data flows.", outcomes: isSwedish ? ["260% ROI", "768 timmar sparade årligen", "Helautomatiserad rapportering"] : ["260% ROI", "768 hours saved annually", "Fully automated reporting"], image: mcdonaldsImage, href: "/cases/mcdonalds-skandinavien-ai-ekonomiautomation" },
  ];

  return (
    <Layout>
      {seoOverride || (
        <SEO
          title="AI-automatisering för enterprise | Suteki Studios"
          description="Intelligenta automatiseringslösningar som frigör tid och minskar fel. AI-drivna arbetsflöden anpassade för enterprise-skala."
          lang="sv"
          canonicalUrl="https://sutekistudios.com/ai-automation-enterprise"
          alternateSv="https://sutekistudios.com/ai-automation-enterprise"
          alternateEn="https://sutekistudios.com/en/ai-automation-enterprise"
        />
      )}

      {/* ── HERO ─────────────────────────────────────── */}
      <section className="min-h-[60vh] flex items-end relative overflow-hidden" data-hero="true" style={{ background: 'linear-gradient(180deg, hsl(220,20%,5%) 0%, hsl(222,47%,11%) 100%)' }}>
        <div className="container mx-auto px-6 lg:px-8 relative z-10 pb-20 pt-40">
          <div className="max-w-3xl">
            <p className="hero-eyebrow mb-5">AI AUTOMATION & ENTERPRISE INTELLIGENCE</p>
            <h1 className="display mb-6">
              {isSwedish ? "AI-automation som levererar mätbar ROI" : "AI Automation That Delivers Measurable ROI"}
            </h1>
            <p className="text-lg hero-text-body max-w-xl mb-8 leading-relaxed">
              {isSwedish
                ? "Suteki Studios utvecklar AI-automationssystem och RPA-lösningar som ersätter manuella processer, eliminerar fel och frigör tusentals arbetstimmar. Byggda för enterprise-skala med bevisade resultat."
                : "Suteki Studios develops AI automation systems and RPA solutions that replace manual processes, eliminate errors, and free thousands of work hours. Built for enterprise scale with proven results."}
            </p>
            <a href="https://calendly.com/sutekistudios/strategic-project-discussion" target="_blank" rel="noopener noreferrer" className="btn-white inline-flex items-center gap-2">
              {isSwedish ? "Boka ett möte" : "Book a Meeting"} <ArrowRight className="h-4 w-4" />
            </a>
          </div>
        </div>
      </section>

      {/* ── CASES ────────────────────────────────────── */}
      <section className="section-white py-[var(--space-section)]">
        <div className="container mx-auto px-6 lg:px-8">
          <div className="max-w-2xl mb-[var(--space-block)]">
            <p className="eyebrow mb-3">{isSwedish ? "Bevisade resultat" : "Proven Results"}</p>
            <h2>{isSwedish ? "Levererade automationsprojekt" : "Delivered Automation Projects"}</h2>
          </div>
          <div className="grid md:grid-cols-2 gap-8">
            {cases.map((c) => (
              <div key={c.client} className="enterprise-card overflow-hidden image-card">
                <div className="aspect-video overflow-hidden">
                  <img src={c.image} alt={c.title} loading="lazy" className="w-full h-full object-cover" />
                </div>
                <div className="p-6">
                  <p className="eyebrow-muted mb-2">{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-2 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 inline-flex items-center gap-1 hover:opacity-80 transition-opacity">
                    {isSwedish ? "Visa case →" : "View case →"}
                  </Link>
                </div>
              </div>
            ))}
          </div>
        </div>
      </section>

      {/* ── WHAT WE DELIVER ──────────────────────────── */}
      <section className="section-beige py-[var(--space-section)]">
        <div className="container mx-auto px-6 lg:px-8">
          <div className="max-w-2xl">
            <p className="eyebrow mb-3">{isSwedish ? "Leveransomfång" : "Delivery Scope"}</p>
            <h2 className="mb-6">{isSwedish ? "Vad vi levererar" : "What We Deliver"}</h2>
            <ul className="space-y-4">
              {(isSwedish
                ? ["Processautomation med AI och RPA", "Realtidsrapportering utan manuella fel", "Integration med befintliga affärssystem", "Skalbar arkitektur för enterprise"]
                : ["Process automation with AI and RPA", "Real-time reporting without manual errors", "Integration with existing business systems", "Scalable enterprise architecture"]
              ).map((item, i) => (
                <li key={i} className="flex items-center gap-3">
                  <CheckCircle2 className="h-5 w-5 text-primary flex-shrink-0" />
                  <span className="text-muted-foreground">{item}</span>
                </li>
              ))}
            </ul>
          </div>
        </div>
      </section>

      <RelatedSolutions excludeHrefs={["/ai-automation-enterprise"]} />

      {/* ── CTA ─────────────────────────────────────── */}
      <section className="section-dark py-[var(--space-section)]" data-theme="dark">
        <div className="container mx-auto px-6 lg:px-8">
          <div className="max-w-3xl mx-auto text-center">
            <h2 className="mb-4">{isSwedish ? "Redo att automatisera?" : "Ready to Automate?"}</h2>
            <p className="text-lg mb-8" style={{ color: 'rgba(255,255,255,0.7)' }}>
              {isSwedish
                ? "Boka ett strategiskt möte för att diskutera hur AI-automation kan skapa mätbar ROI i er organisation."
                : "Book a strategic meeting to discuss how AI automation can create measurable ROI in your organization."}
            </p>
            <a href="https://calendly.com/sutekistudios/strategic-project-discussion" target="_blank" rel="noopener noreferrer" className="btn-white inline-flex items-center gap-2">
              {isSwedish ? "Boka möte" : "Book a Meeting"} <ArrowRight className="h-4 w-4" />
            </a>
          </div>
        </div>
      </section>
    </Layout>
  );
}
