import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';

const resources = {
  en: {
    translation: {
      "home": "Home",
      "ourProducts": "Our Products",
      "admin": "Admin",
      "logoAlt": "SweetHome Logo",
      "brandNamePart1": "Sweet",
      "brandNamePart2": "Home",
      "openMainMenu": "Open main menu",
      "switchToArabic": "Switch to Arabic",
      "switchToEnglish": "Switch to English",
    
      "adminDashboard": "Admin Dashboard",
      "manageProperties": "Manage properties, bookings, and users",
      "pricesInSYP": "All prices in Syrian Pounds (SYP)",
      
      
      "totalUsers": "Total Users",
      "totalProperties": "Total Properties",
      "activeBookings": "Active Bookings",
      "availableProperties": "Available Properties",
      "usersWithActiveBookings": "users with active bookings",
      "propertiesAvailable": "properties available for booking",
      "bookingRequestsPending": "booking requests pending",
      "propertiesReadyForRent": "properties ready for rent",
      
     
      "properties": "Properties",
      "bookingRequests": "Booking Requests",
      "users": "Users",
      "propertiesManagement": "Properties Management",
      "bookingRequestsManagement": "Booking Requests Management",
      "usersManagement": "Users Management",
      
     
      "addEditDeleteProperties": "Add, edit, or delete available properties",
      "addNewProperty": "Add New Property",
      "searchProperties": "Search properties...",
      "filter": "Filter",
      "export": "Export",
      "viewDetails": "View Details",
      "edit": "Edit",
      "delete": "Delete",
      "features": "Features",
      "bedrooms": "Bedrooms",
      "bathrooms": "Bathrooms",
      "area": "Area",
      "price": "Price",
      "available": "Available",
      "booked": "Booked",
      "month": "month",
      "status": "Status",
      "location": "Location",
      "type": "Type",
      
      "swimmingPool": "Swimming Pool",
      "privateGarden": "Private Garden",
      "parking": "Parking",
      "superLuxFinish": "Super Lux Finish",
      "equippedKitchen": "Equipped Kitchen",
      "centralHeating": "Central Heating",
      "balcony": "Balcony",
      "securitySystem": "Security System",
      "largeGarden": "Large Garden",
      "receptionHall": "Reception Hall",
      "maidRoom": "Maid Room",
      "garage": "Garage",
      "seaView": "Sea View",
      "centralAC": "Central AC",
      "fruitGarden": "Fruit Garden",
      "highWall": "High Wall",
      "advancedSecurity": "Advanced Security",
      "storage": "Storage",
      
      "villa": "Villa",
      "apartment": "Apartment",
      "house": "House",
      
      
      "manageBookingRequests": "Manage property booking requests from users",
      "bookingRequest": "Booking Request",
      "user": "User",
      "property": "Property",
      "duration": "Duration",
      "totalAmount": "Total Amount",
      "from": "From",
      "to": "to",
      "requestDate": "Request Date",
      "pending": "Pending",
      "approved": "Approved",
      "rejected": "Rejected",
      "accept": "Accept",
      "reject": "Reject",
      "bookingId": "Booking ID",
      "startDate": "Start Date",
      "endDate": "End Date",
      
      
      "viewUserDetails": "View user details and their bookings",
      "activeBookings": "Active Bookings",
      "totalBookings": "Total Bookings",
      "currentActiveBooking": "Current Active Booking",
      "bookingPeriod": "Booking Period",
      "noActiveBookings": "No active bookings at the moment",
      "viewFullDetails": "View Full Details",
      "userDetails": "User Details",
      "personalInformation": "Personal Information",
      "fullName": "Full Name",
      "email": "Email",
      "phoneNumber": "Phone Number",
      "joinDate": "Join Date",
      "bookingStatistics": "Booking Statistics",
      "currentBooking": "Current Booking",
      
     
      "damascus": "Damascus",
      "aleppo": "Aleppo",
      "homs": "Homs",
      "latakia": "Latakia",
      "daraa": "Daraa",
      "alMazzeh": "Al-Mazzeh",
      "alShahba": "Al-Shahba",
      "babaAmr": "Baba Amr",
      "blueBeach": "Blue Beach",
      "doctorsDistrict": "Doctors District",
      
      "luxuryVillaDamascus": "Luxury Villa in Damascus",
      "modernApartmentAleppo": "Modern Apartment in Aleppo",
      "familyHouseHoms": "Family House in Homs",
      "seasideApartmentLatakia": "Seaside Apartment in Latakia",
      "villaDaraa": "Villa in Daraa",
      
      
      "heroTitleLine1": "Finding Your New",
      "heroTitleLine2": "Home Is Simple",
      "heroSubtitle": "We provide high-quality rental listings to help you find the perfect home",
      "rentTab": "Rent",
      "buyTab": "Buy",
      "sellTab": "Sell",
      "cityStreetLabel": "City / Street",
      "cityStreetPlaceholder": "Enter city or street",
      "rentTypeLabel": "Typology of rent",
      "selectType": "Select type",
      "studio": "Studio",
      "priceLabel": "Price",
      "selectPriceRange": "Select price range",
      "priceRange1": "$0 - $500",
      "priceRange2": "$500 - $1,000",
      "priceRange3": "$1,000 - $2,000",
      "priceRange4": "$2,000 - $3,000",
      "priceRange5": "$3,000+",
      "searchButton": "Search",
      "propertiesListed": "Properties Listed",
      "citiesCovered": "Cities Covered",
      "customerSatisfaction": "Customer Satisfaction",
      "whyChooseUsTitle": "Why Choose SweetHome?",
      "whyChooseUsSubtitle": "We make finding your perfect home simple, fast, and stress-free",
      "feature1Title": "Verified Listings",
      "feature1Description": "Every property is thoroughly verified to ensure accuracy and quality. No surprises, just real homes.",
      "feature2Title": "Secure Process",
      "feature2Description": "Your safety is our priority. We provide secure transactions and protect your personal information.",
      "feature3Title": "Fast Results",
      "feature3Description": "Find your perfect home in minutes with our advanced search and matching algorithms.",
      
      
      "footerDescription": "Premium furniture and home decor for your perfect space.",
      "quickLinks": "Quick Links",
      "contactUs": "Contact Us",
      "stayUpdated": "Stay Updated",
      "yourEmail": "Your email",
      "subscribe": "Subscribe",
      "phone": "(+963) 938 992 000",
      "footerEmail": "info@sweethome.com",
      "allRightsReserved": "All rights reserved.",
      "copyright": "SweetHome"
    }
  },
  ar: {
    translation: {
      
      "home": "الرئيسية",
      "ourProducts": "منتجاتنا",
      "admin": "الإدارة",
    //   "logoAlt": "شعار سويت هوم",
      "brandNamePart1": "سويت",
      "brandNamePart2": "هوم",
      "openMainMenu": "فتح القائمة الرئيسية",
      "switchToArabic": "التبديل للعربية",
      "switchToEnglish": "التبديل للإنجليزية",
      
     
      "adminDashboard": "لوحة تحكم المسؤول",
      "manageProperties": "إدارة العقارات والحجوزات والمستخدمين",
      "pricesInSYP": "جميع الأسعار بالليرة السورية",
      
     
      "totalUsers": "إجمالي المستخدمين",
      "totalProperties": "إجمالي العقارات",
      "activeBookings": "الحجوزات النشطة",
      "availableProperties": "العقارات المتاحة",
      "usersWithActiveBookings": "مستخدم لديه حجوزات نشطة",
      "propertiesAvailable": "عقار متاح للحجز",
      "bookingRequestsPending": "طلب حجز بانتظار الموافقة",
      "propertiesReadyForRent": "عقار جاهز للإيجار",
      
    
      "properties": "العقارات",
      "bookingRequests": "طلبات الحجز",
      "users": "المستخدمين",
      "propertiesManagement": "إدارة العقارات",
      "bookingRequestsManagement": "إدارة طلبات الحجز",
      "usersManagement": "إدارة المستخدمين",
      
     
      "addEditDeleteProperties": "إضافة، تعديل، أو حذف العقارات المتاحة",
      "addNewProperty": "إضافة عقار جديد",
      "searchProperties": "بحث عن عقار...",
      "filter": "فلترة",
      "export": "تصدير",
      "viewDetails": "عرض التفاصيل",
      "edit": "تعديل",
      "delete": "حذف",
      "features": "المميزات",
      "bedrooms": "غرف نوم",
      "bathrooms": "حمامات",
      "area": "المساحة",
      "price": "السعر",
      "available": "متاح",
      "booked": "محجوز",
      "month": "شهر",
      "status": "الحالة",
      "location": "الموقع",
      "type": "النوع",
      
      "swimmingPool": "مسبح",
      "privateGarden": "حديقة خاصة",
      "parking": "موقف سيارات",
      "superLuxFinish": "تشطيب سوبر لوكس",
      "equippedKitchen": "مطبخ مجهز",
      "centralHeating": "تدفئة مركزية",
      "balcony": "بلكونة",
      "securitySystem": "نظام أمني",
      "largeGarden": "حديقة كبيرة",
      "receptionHall": "صالة استقبال",
      "maidRoom": "غرفة خادمة",
      "garage": "جراج",
      "seaView": "إطلالة بحرية",
      "centralAC": "تكييف مركزي",
      "fruitGarden": "حديقة مثمرة",
      "highWall": "سور عالي",
      "advancedSecurity": "أنظمة أمن متطورة",
      "storage": "مخزن",
      
      "villa": "فيلا",
      "apartment": "شقة",
      "house": "بيت",
      
     
      "manageBookingRequests": "إدارة طلبات حجز العقارات من المستخدمين",
      "bookingRequest": "طلب حجز",
      "user": "المستخدم",
      "property": "العقار",
      "duration": "المدة",
      "totalAmount": "القيمة الإجمالية",
      "from": "من",
      "to": "إلى",
      "requestDate": "تاريخ الطلب",
      "pending": "بانتظار الموافقة",
      "approved": "مقبول",
      "rejected": "مرفوض",
      "accept": "قبول",
      "reject": "رفض",
      "bookingId": "رقم الحجز",
      "startDate": "تاريخ البدء",
      "endDate": "تاريخ الانتهاء",
      
      
      "viewUserDetails": "عرض تفاصيل المستخدمين وحجوزاتهم",
      "activeBookings": "حجوزات نشطة",
      "totalBookings": "إجمالي الحجوزات",
      "currentActiveBooking": "الحجز النشط الحالي",
      "bookingPeriod": "فترة الحجز",
      "noActiveBookings": "لا يوجد حجوزات نشطة حالياً",
      "viewFullDetails": "عرض تفاصيل كاملة",
      "userDetails": "تفاصيل المستخدم",
      "personalInformation": "المعلومات الشخصية",
      "fullName": "الاسم الكامل",
      "email": "البريد الإلكتروني",
      "phoneNumber": "رقم الهاتف",
      "joinDate": "تاريخ التسجيل",
      "bookingStatistics": "إحصائيات الحجوزات",
      "currentBooking": "الحجز الحالي",
      
      
      "damascus": "دمشق",
      "aleppo": "حلب",
      "homs": "حمص",
      "latakia": "اللاذقية",
      "daraa": "درعا",
      "alMazzeh": "المزة",
      "alShahba": "الشهباء",
      "babaAmr": "بابا عمرو",
      "blueBeach": "الشاطئ الأزرق",
      "doctorsDistrict": "حي الأطباء",
      
      "luxuryVillaDamascus": "فيلا فاخرة في دمشق",
      "modernApartmentAleppo": "شقة حديثة في حلب",
      "familyHouseHoms": "بيت عائلي في حمص",
      "seasideApartmentLatakia": "شقة بجانب البحر في اللاذقية",
      "villaDaraa": "فيلا في درعا",
      
    
      "heroTitleLine1": "إيجاد منزلك الجديد",
      "heroTitleLine2": "أصبح سهلاً",
      "heroSubtitle": "نوفر قوائم عقارات عالية الجودة لمساعدتك في إيجاد المنزل المثالي",
      "rentTab": "إيجار",
      "buyTab": "شراء",
      "sellTab": "بيع",
      "cityStreetLabel": "المدينة / الشارع",
      "cityStreetPlaceholder": "أدخل المدينة أو الشارع",
      "rentTypeLabel": "نوع الإيجار",
      "selectType": "اختر النوع",
      "studio": "استوديو",
      "priceLabel": "السعر",
      "selectPriceRange": "اختر نطاق السعر",
      "priceRange1": "٠$ - ٥٠٠$",
      "priceRange2": "٥٠٠$ - ١٠٠٠$",
      "priceRange3": "١٠٠٠$ - ٢٠٠٠$",
      "priceRange4": "٢٠٠٠$ - ٣٠٠٠$",
      "priceRange5": "٣٠٠٠$+",
      "searchButton": "بحث",
      "propertiesListed": "عقار مدرج",
      "citiesCovered": "مدينة مغطاة",
      "customerSatisfaction": "رضا العملاء",
      "whyChooseUsTitle": "لماذا تختار سويت هوم؟",
      "whyChooseUsSubtitle": "نجعل عملية إيجاد منزلك المثالي سهلة وسريعة وخالية من التوتر",
      "feature1Title": "قوائم موثقة",
      "feature1Description": "كل عقار يتم التحقق منه بدقة لضمان الدقة والجودة. لا مفاجآت، فقط منازل حقيقية.",
      "feature2Title": "عملية آمنة",
      "feature2Description": "سلامتك هي أولويتنا. نوفر معاملات آمنة ونحمي معلوماتك الشخصية.",
      "feature3Title": "نتائج سريعة",
      "feature3Description": "اعثر على منزلك المثالي في دقائق باستخدام خوارزميات البحث والمطابقة المتقدمة لدينا.",
      
      "footerDescription": "أثاث فاخر وديكور منزلي لمساحتك المثالية.",
      "quickLinks": "روابط سريعة",
      "contactUs": "اتصل بنا",
      "stayUpdated": "ابق على اطلاع",
      "yourEmail": "بريدك الإلكتروني",
      "subscribe": "اشتراك",
      "phone": "(+963) 938 992 000",
      "footerEmail": "info@sweethome.com",
      "allRightsReserved": "جميع الحقوق محفوظة.",
      "copyright": "سويت هوم"
    }
  }
};

i18n
  .use(LanguageDetector)
  .use(initReactI18next)
  .init({
    resources,
    fallbackLng: 'en',
    interpolation: {
      escapeValue: false
    },
    detection: {
      order: ['localStorage', 'navigator'],
      caches: ['localStorage']
    }
  });

export default i18n;