import type { Locale } from "@/config/site";

export type Localized = {
  ar: string;
  en: string;
};

export type FeatureItem = {
  icon: "mobile" | "web" | "dashboard" | "api" | "analytics" | "notifications" | "localization" | "security";
  title: Localized;
  description: Localized;
};

export type PlanItem = {
  id: string;
  badge?: Localized;
  title: Localized;
  duration: Localized;
  price: Localized;
  subtitle: Localized;
  features: Localized[];
  highlighted?: boolean;
};

export type AppShowcaseItem = {
  key: "home" | "stores" | "coupons" | "cashback";
  title: Localized;
  description: Localized;
  bullets: Localized[];
};

export type FaqItem = {
  question: Localized;
  answer: Localized;
};

export const salesNav = [
  { href: "/sell", ar: "الرئيسية", en: "Home" },
  { href: "/sell/features", ar: "المميزات", en: "Features" },
  { href: "/sell/pricing", ar: "الباقات", en: "Pricing" },
  { href: "/sell/about", ar: "تعريف التطبيق", en: "About" },
  { href: "/sell/contact", ar: "اتصل بنا", en: "Contact" },
];

export const heroStats = [
  { value: "+120", label: { ar: "نقطة API جاهزة", en: "API endpoints ready" } },
  { value: "4", label: { ar: "منصات تشغيل", en: "Running platforms" } },
  { value: "2", label: { ar: "لغات كاملة", en: "Full languages" } },
  { value: "99.9%", label: { ar: "جاهزية للانطلاق", en: "Launch readiness" } },
];

export const featureItems: FeatureItem[] = [
  {
    icon: "mobile",
    title: { ar: "تطبيق موبايل احترافي", en: "Premium Mobile App" },
    description: {
      ar: "واجهة عربية/إنجليزية حديثة مع تجربة سريعة وسلسة على أندرويد وiOS.",
      en: "Modern Arabic/English UX with fast and smooth flow for Android and iOS.",
    },
  },
  {
    icon: "web",
    title: { ar: "موقع كوبونات بيعي", en: "Conversion-Driven Web App" },
    description: {
      ar: "صفحات متاجر وكوبونات وكاش باك جاهزة للسيو والتحويلات.",
      en: "SEO-friendly store, coupon, and cashback pages built for conversions.",
    },
  },
  {
    icon: "dashboard",
    title: { ar: "لوحة تحكم أدمن شاملة", en: "Full Admin Dashboard" },
    description: {
      ar: "إدارة كاملة للمحتوى، الكوبونات، المتاجر، المقالات، الإشعارات، والإعدادات.",
      en: "Manage content, coupons, stores, articles, notifications, and settings.",
    },
  },
  {
    icon: "api",
    title: { ar: "Laravel API جاهز للإنتاج", en: "Production-Ready Laravel API" },
    description: {
      ar: "هيكلة نظيفة مع Sanctum ونسخ API وفلترة احترافية.",
      en: "Clean architecture with Sanctum auth, API versioning, and smart filters.",
    },
  },
  {
    icon: "analytics",
    title: { ar: "تقارير زيارات ونقرات", en: "Visits & Click Analytics" },
    description: {
      ar: "تحليلات مفصلة للأداء حسب الدولة واللغة والمتجر والكوبون.",
      en: "Detailed performance reports by country, language, store, and coupon.",
    },
  },
  {
    icon: "notifications",
    title: { ar: "إشعارات وتجهيز Firebase", en: "Notifications + Firebase Ready" },
    description: {
      ar: "بنية إشعارات جاهزة لربط تطبيق الموبايل وإرسال الحملات.",
      en: "Notification-ready structure for mobile integration and campaigns.",
    },
  },
  {
    icon: "localization",
    title: { ar: "دعم عربي/إنجليزي كامل", en: "Full Arabic/English Support" },
    description: {
      ar: "RTL/LTR مع ترجمة شاملة للمحتوى والتنقل.",
      en: "RTL/LTR support with complete multilingual content and navigation.",
    },
  },
  {
    icon: "security",
    title: { ar: "أمان وصلاحيات متقدمة", en: "Advanced Security & Roles" },
    description: {
      ar: "نظام صلاحيات أدمن وحماية API مبنية على أفضل الممارسات.",
      en: "Role-aware admin security and protected APIs with best practices.",
    },
  },
];

export const pricingPlans: PlanItem[] = [
  {
    id: "3m",
    title: { ar: "باقة 3 شهور", en: "3-Month Plan" },
    duration: { ar: "اشتراك مرن قصير", en: "Short flexible subscription" },
    price: { ar: "2,400 ر.س", en: "SAR 2,400" },
    subtitle: { ar: "مناسبة للانطلاق السريع", en: "Great for a quick launch" },
    features: [
      { ar: "تركيب وتشغيل المنصة", en: "Platform setup and launch" },
      { ar: "ربط API كامل (ويب + موبايل + أدمن)", en: "Full API connection (web + mobile + admin)" },
      { ar: "دعم فني أساسي طوال فترة الاشتراك", en: "Basic technical support during subscription" },
      { ar: "نشر على سيرفر خاص", en: "Private server deployment" },
    ],
  },
  {
    id: "6m",
    badge: { ar: "الأكثر طلبًا", en: "Most Popular" },
    title: { ar: "باقة 6 شهور", en: "6-Month Plan" },
    duration: { ar: "نمو مستقر", en: "Stable growth window" },
    price: { ar: "4,200 ر.س", en: "SAR 4,200" },
    subtitle: { ar: "توازن ممتاز بين السعر والمميزات", en: "Best value/features balance" },
    highlighted: true,
    features: [
      { ar: "كل مميزات باقة 3 شهور", en: "Everything in 3-month plan" },
      { ar: "تغيير الواجهة الرئيسية", en: "Homepage customization" },
      { ar: "تغيير اللوجو والاسم", en: "Logo and brand name replacement" },
      { ar: "تغيير ألوان الهوية", en: "Brand color customization" },
      { ar: "اختيار أكثر من تصميم للصفحة الرئيسية", en: "Multiple homepage design options" },
      { ar: "استلام لوحة تحكم الإدارة كاملة", en: "Full admin dashboard access" },
      { ar: "رفع التطبيق على Google Play وApp Store", en: "Publish app to Google Play and App Store" },
      { ar: "دعم فني وتحديثات طوال الاشتراك", en: "Support and updates during subscription" },
    ],
  },
  {
    id: "12m",
    title: { ar: "باقة 12 شهر", en: "12-Month Plan" },
    duration: { ar: "تشغيل طويل المدى", en: "Long-term operation" },
    price: { ar: "7,200 ر.س", en: "SAR 7,200" },
    subtitle: { ar: "أفضل عائد سنوي مع توسع أسرع", en: "Best annual ROI with faster scaling" },
    features: [
      { ar: "كل مميزات باقة 6 شهور", en: "Everything in 6-month plan" },
      { ar: "تحسينات UX متقدمة حسب سلوك المستخدم", en: "Advanced UX optimizations based on usage" },
      { ar: "تقارير تسويقية شهرية مفصلة", en: "Detailed monthly growth reports" },
      { ar: "استشارات تطوير وخطة توسع", en: "Product strategy and scaling consultations" },
      { ar: "رفع التطبيق على Google Play وApp Store", en: "Publish app to Google Play and App Store" },
    ],
  },
  {
    id: "life",
    badge: { ar: "استلام السورس", en: "Source Code Included" },
    title: { ar: "باقة مدى الحياة", en: "Lifetime Plan" },
    duration: { ar: "دفعة واحدة", en: "One-time payment" },
    price: { ar: "14,900 ر.س", en: "SAR 14,900" },
    subtitle: { ar: "استلام كامل السورس كود والملكية الكاملة", en: "Full source code handover and complete ownership" },
    features: [
      { ar: "كل مميزات باقة 12 شهر", en: "Everything in 12-month plan" },
      { ar: "استلام السورس كود كامل (Backend + Web + Admin + Mobile)", en: "Complete source code (Backend + Web + Admin + Mobile)" },
      { ar: "توثيق وتشغيل وتسليم فني كامل", en: "Complete technical handover and documentation" },
      { ar: "رفع التطبيق على Google Play وApp Store", en: "Publish app to Google Play and App Store" },
      { ar: "جلسة تدريب لفريقك", en: "Team onboarding training session" },
    ],
  },
];

export const aboutPoints = [
  {
    ar: "منصة متكاملة للبيع والعمولات: كوبونات + خصومات + كاش باك + مقالات + تقارير.",
    en: "A complete revenue platform: coupons + discounts + cashback + articles + analytics.",
  },
  {
    ar: "جاهزة للتشغيل الفوري مع بنية تطوير مستقبلية نظيفة وقابلة للتوسع.",
    en: "Ready for immediate launch with a clean and scalable architecture.",
  },
  {
    ar: "مناسبة للشركات الناشئة، المسوقين بالعمولة، ومشاريع المحتوى التجاري.",
    en: "Perfect for startups, affiliate marketers, and commerce content businesses.",
  },
];

export const contactChannels = {
  whatsapp: "201033339463",
  phone: "+201033339463",
  email: "sales@coupon-platform.com",
};

export const appShowcaseItems: AppShowcaseItem[] = [
  {
    key: "home",
    title: { ar: "صفحة الرئيسية", en: "Home Screen" },
    description: {
      ar: "واجهة جذابة تعرض العروض الأحدث والمتاجر المميزة مع مسار تحويل سريع.",
      en: "A conversion-driven screen showing latest offers and featured stores instantly.",
    },
    bullets: [
      { ar: "سلايدر بنرات احترافي", en: "Premium hero banners slider" },
      { ar: "أقسام سريعة مع فلترة", en: "Quick categories with filtering" },
      { ar: "كروت كوبونات عالية التحويل", en: "High-converting coupon cards" },
    ],
  },
  {
    key: "stores",
    title: { ar: "صفحة المتاجر", en: "Stores Page" },
    description: {
      ar: "عرض المتاجر حسب الدولة والتصنيف مع ترتيب وبحث احترافي.",
      en: "Stores listing by country/category with advanced search and sorting.",
    },
    bullets: [
      { ar: "بحث سريع باسم المتجر", en: "Fast store name search" },
      { ar: "فلترة حسب الأقسام", en: "Category-based filters" },
      { ar: "صفحات متجر مفصلة", en: "Detailed store pages" },
    ],
  },
  {
    key: "coupons",
    title: { ar: "صفحة الكوبونات", en: "Coupons Page" },
    description: {
      ar: "إدارة وعرض أكواد الخصم بنظام نسخ/تتبع/تحليلات متكامل.",
      en: "Powerful coupon discovery with copy tracking and analytics.",
    },
    bullets: [
      { ar: "نسخ الكود بنقرة واحدة", en: "One-click code copy" },
      { ar: "تتبع النقرات والنسخ", en: "Click/copy tracking" },
      { ar: "فلترة حسب النوع والمتجر", en: "Filter by type and store" },
    ],
  },
  {
    key: "cashback",
    title: { ar: "صفحة الكاش باك", en: "Cashback Page" },
    description: {
      ar: "منظومة كاش باك واضحة للمستخدم مع تتبع عمليات التفعيل والتقارير.",
      en: "End-to-end cashback flow with activations and performance reporting.",
    },
    bullets: [
      { ar: "تفعيل الكاش باك للحسابات", en: "User cashback activation flow" },
      { ar: "سجل عمليات الكاش باك", en: "Cashback history and status" },
      { ar: "تقارير أداء في الأدمن", en: "Admin analytics and reporting" },
    ],
  },
];

export const salesFaq: FaqItem[] = [
  {
    question: {
      ar: "هل المنصة جاهزة للإطلاق التجاري فورًا؟",
      en: "Is the platform ready for immediate commercial launch?",
    },
    answer: {
      ar: "نعم، المنصة جاهزة بالكامل وتشمل الموقع، التطبيق، لوحة الأدمن، والـ API.",
      en: "Yes. It is launch-ready with web, mobile app, admin dashboard, and full API.",
    },
  },
  {
    question: {
      ar: "هل أقدر أغير الهوية بالكامل (اسم، لوجو، ألوان)؟",
      en: "Can I fully change branding (name, logo, colors)?",
    },
    answer: {
      ar: "بداية من الباقة الثانية يمكنك تخصيص الهوية والتصميم الرئيسي كما تريد.",
      en: "Starting from the second plan, you get full branding and homepage customization.",
    },
  },
  {
    question: {
      ar: "هل رفع التطبيقات على Google Play وApp Store مشمول؟",
      en: "Is publishing to Google Play and App Store included?",
    },
    answer: {
      ar: "نعم، مشمول في الباقة الثانية والثالثة وباقة مدى الحياة.",
      en: "Yes, included in 2nd, 3rd, and lifetime plans.",
    },
  },
  {
    question: {
      ar: "هل باقة مدى الحياة تشمل السورس كود؟",
      en: "Does lifetime plan include source code?",
    },
    answer: {
      ar: "نعم، تستلم السورس كود كامل مع التسليم الفني والتوثيق.",
      en: "Yes, you receive complete source code with handover and documentation.",
    },
  },
  {
    question: {
      ar: "هل يوجد دعم فني وتحديثات؟",
      en: "Do I get support and updates?",
    },
    answer: {
      ar: "نعم، يوجد دعم وتحديثات حسب مدة الاشتراك، ومع خيارات توسع إضافية.",
      en: "Yes. Support and updates are included during subscription, with optional scaling plans.",
    },
  },
];

export function t(locale: Locale, value: Localized): string {
  return locale === "ar" ? value.ar : value.en;
}
