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

  // Suppliers data with translations
  const suppliersData = {
    ru: [
      {
        id: 1,
        name: "UralMetal",
        location: "Yekaterinburg",
        coords: [56.84, 60.65],
        totalPrice: 180000,
        rating: 4.8,
        reviews: 127,
        experience: "15 years in business",
        verified: true,
        logistics: [
          { 
            type: 'auto', 
            route: 'Auto delivery', 
            time: '5-7 days', 
            cost: 15000 
          },
          { 
            type: 'multimodal', 
            route: 'Auto + Sea + Auto', 
            time: '12-15 days', 
            cost: 8000 
          },
          { 
            type: 'rail', 
            route: 'Auto + Rail + Auto', 
            time: '8-10 days', 
            cost: 12000 
          }
        ]
      },
      {
        id: 2,
        name: "SiberiaSteel",
        location: "Novosibirsk", 
        coords: [55.03, 82.92],
        totalPrice: 175000,
        rating: 4.6,
        reviews: 89,
        experience: "12 years in business",
        verified: true,
        logistics: [
          { 
            type: 'auto', 
            route: 'Auto delivery', 
            time: '6-8 days', 
            cost: 18000 
          },
          { 
            type: 'rail', 
            route: 'Auto + Rail + Auto', 
            time: '10-12 days', 
            cost: 10000 
          }
        ]
      }
    ],
    en: [
      {
        id: 1,
        name: "UralMetal",
        location: "Yekaterinburg",
        coords: [56.84, 60.65],
        totalPrice: 180000,
        rating: 4.8,
        reviews: 127,
        experience: "15 years in business",
        verified: true,
        logistics: [
          { 
            type: 'auto', 
            route: 'Auto delivery', 
            time: '5-7 days', 
            cost: 15000 
          },
          { 
            type: 'multimodal', 
            route: 'Auto + Sea + Auto', 
            time: '12-15 days', 
            cost: 8000 
          },
          { 
            type: 'rail', 
            route: 'Auto + Rail + Auto', 
            time: '8-10 days', 
            cost: 12000 
          }
        ]
      },
      {
        id: 2,
        name: "SiberiaSteel",
        location: "Novosibirsk", 
        coords: [55.03, 82.92],
        totalPrice: 175000,
        rating: 4.6,
        reviews: 89,
        experience: "12 years in business",
        verified: true,
        logistics: [
          { 
            type: 'auto', 
            route: 'Auto delivery', 
            time: '6-8 days', 
            cost: 18000 
          },
          { 
            type: 'rail', 
            route: 'Auto + Rail + Auto', 
            time: '10-12 days', 
            cost: 10000 
          }
        ]
      }
    ]
  }

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