/* ============================================================
   Uzbekistan — real outline loaded from /uzbekistan.svg
   14 viloyats + Tashkent city; ngo.uz teal palette
   ============================================================ */

// Maps oziq-ai region IDs (lowercase) → ISO 3166-2:UZ codes used as path
// IDs in the real SVG. Keep this in sync with REGIONS in data.jsx.
const UZ_ID_MAP = {
  qrq: 'UZ-QR',  // Qoraqalpogʻiston
  xor: 'UZ-XO',  // Xorazm
  nav: 'UZ-NW',  // Navoiy
  buk: 'UZ-BU',  // Buxoro
  sam: 'UZ-SA',  // Samarqand
  jiz: 'UZ-JI',  // Jizzax
  syr: 'UZ-SI',  // Sirdaryo
  tos: 'UZ-TO',  // Toshkent viloyati
  tas: 'UZ-TK',  // Toshkent shahri
  qsh: 'UZ-QA',  // Qashqadaryo
  sur: 'UZ-SU',  // Surxondaryo
  nam: 'UZ-NG',  // Namangan
  and: 'UZ-AN',  // Andijon
  fer: 'UZ-FA',  // Farg'ona
};

const UZ_GEO = {
  viewBox: '0 0 800 420',
  // ordered roughly W to E so labels read naturally
  regions: [
    {
      id: 'qrq', code: 'QRQ',
      d: 'M 40 30 L 200 30 L 245 75 L 250 130 L 230 180 L 250 230 L 220 285 L 170 290 L 130 250 L 100 200 L 60 165 L 35 110 Z',
      label: [140, 145],
    },
    {
      id: 'xor', code: 'XOR',
      d: 'M 170 290 L 220 285 L 245 295 L 235 335 L 195 340 L 165 320 Z',
      label: [200, 315],
    },
    {
      id: 'nav', code: 'NAV',
      d: 'M 250 130 L 360 110 L 410 145 L 420 220 L 380 255 L 325 250 L 290 220 L 250 230 Z',
      label: [340, 195],
    },
    {
      id: 'buk', code: 'BUK',
      d: 'M 245 295 L 290 285 L 325 250 L 380 255 L 395 305 L 360 355 L 290 345 L 245 320 Z',
      label: [320, 315],
    },
    {
      id: 'sam', code: 'SAM',
      d: 'M 410 145 L 470 165 L 480 215 L 460 250 L 420 245 L 410 220 Z',
      label: [445, 205],
    },
    {
      id: 'jiz', code: 'JIZ',
      d: 'M 360 110 L 450 95 L 485 140 L 470 165 L 410 145 Z',
      label: [425, 130],
    },
    {
      id: 'syr', code: 'SYR',
      d: 'M 485 140 L 545 130 L 555 175 L 530 205 L 480 215 L 470 165 Z',
      label: [515, 175],
    },
    {
      id: 'tos', code: 'TOS',
      d: 'M 545 130 L 645 95 L 685 130 L 670 195 L 615 220 L 555 175 Z',
      label: [610, 150],
    },
    {
      id: 'tas', code: 'TAS',
      // Tashkent city — small enclave inside TOS
      d: 'M 612 145 L 632 142 L 638 162 L 622 168 L 608 160 Z',
      label: [621, 158],
    },
    {
      id: 'qsh', code: 'QSH',
      d: 'M 395 305 L 460 250 L 530 270 L 540 320 L 485 350 L 425 360 Z',
      label: [475, 310],
    },
    {
      id: 'sur', code: 'SUR',
      d: 'M 485 350 L 540 320 L 580 345 L 565 390 L 510 395 Z',
      label: [530, 365],
    },
    {
      id: 'nam', code: 'NAM',
      d: 'M 685 130 L 740 115 L 770 145 L 745 175 L 695 170 Z',
      label: [725, 150],
    },
    {
      id: 'and', code: 'AND',
      d: 'M 745 175 L 770 145 L 795 175 L 770 215 L 720 210 L 695 170 Z',
      label: [755, 190],
    },
    {
      id: 'fer', code: 'FER',
      d: 'M 670 195 L 720 210 L 770 215 L 785 250 L 745 275 L 695 270 L 660 240 Z',
      label: [720, 240],
    },
  ],
};

window.UZ_GEO = UZ_GEO;
window.UZ_ID_MAP = UZ_ID_MAP;
