export default defineEventHandler(async (event) => {
  const query = getQuery(event)
  const locale = query.locale || 'ru'

  // Данные сервисных компаний с переводами
  const companiesData = {
    ru: {
      logistics: [
        { 
          id: 1, 
          name: "РосЛогистик", 
          price: 15000, 
          description: "Федеральная сеть перевозок", 
          rating: 4.8, 
          reviews: 156,
          experience: "15 лет опыта",
          verified: true
        },
        { 
          id: 2, 
          name: "ТрансСервис", 
          price: 12000, 
          description: "Региональный перевозчик", 
          rating: 4.5, 
          reviews: 89,
          experience: "8 лет опыта",
          verified: false
        }
      ],
      banks: [
        { 
          id: 1, 
          name: "ВТБ", 
          rate: 12.5, 
          terms: "Кредит на закупку сырья", 
          period: "до 24 месяцев",
          rating: 4.7,
          reviews: 89,
          verified: true
        },
        { 
          id: 2, 
          name: "Сбербанк", 
          rate: 13.2, 
          terms: "Торговое финансирование", 
          period: "до 18 месяцев",
          rating: 4.9,
          reviews: 145,
          verified: true
        }
      ],
      insurance: [
        { 
          id: 1, 
          name: "РЕСО", 
          cost: 3500, 
          coverage: "Страхование груза до 500М₽",
          rating: 4.6,
          reviews: 67,
          verified: true
        }
      ],
      laboratories: [
        { 
          id: 1, 
          name: "МеталлТест", 
          price: 8000, 
          tests: "Химанализ, механические свойства", 
          certification: "ISO 9001",
          rating: 4.7,
          reviews: 45,
          verified: true
        }
      ]
    },
    en: {
      logistics: [
        { 
          id: 1, 
          name: "RusLogistics", 
          price: 15000, 
          description: "Federal transportation network", 
          rating: 4.8, 
          reviews: 156,
          experience: "15 years experience",
          verified: true
        },
        { 
          id: 2, 
          name: "TransService", 
          price: 12000, 
          description: "Regional carrier", 
          rating: 4.5, 
          reviews: 89,
          experience: "8 years experience",
          verified: false
        }
      ],
      banks: [
        { 
          id: 1, 
          name: "VTB Bank", 
          rate: 12.5, 
          terms: "Raw materials purchase loan", 
          period: "up to 24 months",
          rating: 4.7,
          reviews: 89,
          verified: true
        },
        { 
          id: 2, 
          name: "Sberbank", 
          rate: 13.2, 
          terms: "Trade financing", 
          period: "up to 18 months",
          rating: 4.9,
          reviews: 145,
          verified: true
        }
      ],
      insurance: [
        { 
          id: 1, 
          name: "RESO Insurance", 
          cost: 3500, 
          coverage: "Cargo insurance up to 500M₽",
          rating: 4.6,
          reviews: 67,
          verified: true
        }
      ],
      laboratories: [
        { 
          id: 1, 
          name: "MetalTest Lab", 
          price: 8000, 
          tests: "Chemical analysis, mechanical properties", 
          certification: "ISO 9001",
          rating: 4.7,
          reviews: 45,
          verified: true
        }
      ]
    }
  }

  return companiesData[locale as 'ru' | 'en'] || companiesData.ru
})