import type { Icon } from "@tabler/icons-react";
import {
  IconAnalyze,
  IconBrain,
  IconBrandWordpress,
  IconChartBar,
  IconCode,
  IconGauge,
  IconLayersLinked,
  IconLayoutGrid,
  IconRobot,
  IconRocket,
  IconSchool,
  IconSearch,
  IconShieldLock,
  IconShoppingCart,
  IconSparkles,
  IconStack2,
  IconTargetArrow,
  IconTools,
  IconTransfer,
  IconVirusOff,
} from "@tabler/icons-react";

// Types
export interface NavLink {
  description?: string;
  descriptionKey?: string;
  href: string;
  icon?: Icon;
  name: string;
  translationKey?: string;
}

export interface NavSection {
  items: NavLink[];
  title: string;
  translationKey?: string;
}

// Services - Audits
const auditsLinks: NavLink[] = [
  {
    name: "Performance Audit",
    translationKey: "performanceAudit",
    description: "Headless performance optimization",
    descriptionKey: "performanceAuditDesc",
    href: "/audits/headless-performance-audit",
    icon: IconChartBar,
  },
  {
    name: "Shopify Speed Audit",
    translationKey: "shopifySpeedAudit",
    description: "E-commerce speed optimization",
    descriptionKey: "shopifySpeedAuditDesc",
    href: "/audits/shopify-speed-audit",
    icon: IconRocket,
  },
  {
    name: "Headless Data Analysis",
    translationKey: "headlessDataAnalysis",
    description: "Technical architecture review",
    descriptionKey: "headlessDataAnalysisDesc",
    href: "/audits/headless-data-analysis",
    icon: IconAnalyze,
  },
  {
    name: "CRO Audit",
    translationKey: "croAudit",
    description: "UX & conversion optimization audit",
    descriptionKey: "croAuditDesc",
    href: "/audits/cro-audit",
    icon: IconTargetArrow,
  },
];

// Services - Builds
const buildsLinks: NavLink[] = [
  {
    name: "All Headless Builds",
    translationKey: "buildsOverview",
    description: "Shopify Hydrogen & WordPress Headless overview",
    descriptionKey: "buildsOverviewDesc",
    href: "/services/builds",
    icon: IconStack2,
  },
  {
    name: "Shopify Headless",
    translationKey: "shopifyHeadless",
    description: "Next.js + Shopify composable builds",
    descriptionKey: "shopifyHeadlessDesc",
    href: "/services/builds/shopify-headless",
    icon: IconShoppingCart,
  },
  {
    name: "WP → Shopify Migration",
    translationKey: "wpToShopifyMigration",
    description: "Seamless platform migration",
    descriptionKey: "wpToShopifyMigrationDesc",
    href: "/services/builds/migration-wordpress-shopify",
    icon: IconTransfer,
  },
];

// Services - WordPress
const wordpressLinks: NavLink[] = [
  {
    name: "All WordPress Services",
    translationKey: "wordpressOverview",
    description: "Maintenance, security & malware removal",
    descriptionKey: "wordpressOverviewDesc",
    href: "/services/wordpress",
    icon: IconLayoutGrid,
  },
  {
    name: "WordPress Headless",
    translationKey: "wordpressHeadless",
    description: "JAMstack WordPress solutions",
    descriptionKey: "wordpressHeadlessDesc",
    href: "/services/builds/wordpress-headless",
    icon: IconCode,
  },
  {
    name: "WordPress Maintenance",
    translationKey: "wordpressMaintenance",
    description: "Proactive updates & monitoring",
    descriptionKey: "wordpressMaintenanceDesc",
    href: "/services/wordpress/maintenance",
    icon: IconTools,
  },
  {
    name: "WordPress Security",
    translationKey: "wordpressSecurity",
    description: "Hardening & threat protection",
    descriptionKey: "wordpressSecurityDesc",
    href: "/services/wordpress/security",
    icon: IconShieldLock,
  },
  {
    name: "Malware Removal",
    translationKey: "wordpressMalwareRemoval",
    description: "Emergency malware cleanup & protection",
    descriptionKey: "wordpressMalwareRemovalDesc",
    href: "/services/wordpress/malware-removal",
    icon: IconVirusOff,
  },
];

// Services - Training
const trainingLinks: NavLink[] = [
  {
    name: "All Training Programs",
    translationKey: "trainingOverview",
    description: "AI & technical SEO workshops",
    descriptionKey: "trainingOverviewDesc",
    href: "/services/training",
    icon: IconSchool,
  },
  {
    name: "Technical SEO",
    translationKey: "technicalSeo",
    description: "Advanced SEO for developers",
    descriptionKey: "technicalSeoDesc",
    href: "/services/training/seo-technical",
    icon: IconSearch,
  },
  {
    name: "AI for Marketers",
    translationKey: "aiForMarketers",
    description: "AI-powered marketing automation",
    descriptionKey: "aiForMarketersDesc",
    href: "/services/training/ai-for-marketers",
    icon: IconBrain,
  },
];

// Services - CRO
const croLinks: NavLink[] = [
  {
    name: "CRO Optimization",
    translationKey: "croOptimization",
    description: "UX, speed & conversion optimization",
    descriptionKey: "croOptimizationDesc",
    href: "/services/cro",
    icon: IconTargetArrow,
  },
];

// Services - Toutes les sections regroupées
export const servicesNav: NavSection[] = [
  {
    title: "Audits",
    translationKey: "audits",
    items: auditsLinks,
  },
  {
    title: "Builds",
    translationKey: "builds",
    items: buildsLinks,
  },
  {
    title: "WordPress",
    translationKey: "wordpress",
    items: wordpressLinks,
  },
  {
    title: "Training",
    translationKey: "training",
    items: trainingLinks,
  },
  {
    title: "CRO",
    translationKey: "cro",
    items: croLinks,
  },
];

// Blog
export const blogLinks: NavLink[] = [
  {
    name: "All Articles",
    translationKey: "allArticles",
    href: "/blog",
    icon: IconSparkles,
  },
  {
    name: "Headless",
    translationKey: "catHeadless",
    href: "/blog?category=Headless",
    icon: IconLayersLinked,
  },
  {
    name: "Performance",
    translationKey: "catPerformance",
    href: "/blog?category=Performance",
    icon: IconGauge,
  },
  {
    name: "CRO",
    translationKey: "catCro",
    href: "/blog?category=CRO",
    icon: IconTargetArrow,
  },
  {
    name: "WordPress",
    translationKey: "catWordpress",
    href: "/blog?category=WordPress",
    icon: IconBrandWordpress,
  },
  {
    name: "E-commerce",
    translationKey: "catEcommerce",
    href: "/blog?category=E-commerce",
    icon: IconShoppingCart,
  },
  {
    name: "SEO",
    translationKey: "catSeo",
    href: "/blog?category=SEO",
    icon: IconSearch,
  },
  {
    name: "AI",
    translationKey: "catAi",
    href: "/blog?category=AI",
    icon: IconRobot,
  },
];

// Navigation principale (top-level pages)
export const mainNavLinks: NavLink[] = [
  {
    name: "About",
    translationKey: "about",
    href: "/about",
  },
  {
    name: "Contact",
    translationKey: "contact",
    href: "/contact",
  },
];

// CTA
export const ctaLink: NavLink = {
  name: "Book Free Audit",
  translationKey: "bookFreeAudit",
  href: "/contact",
};
