// Type for city data
export interface IranianCity {
  name: string;
  province: string;
  position: [number, number];
}

// All Iranian cities with coordinates - sorted by province
export const iranianCities: IranianCity[] = [
  // آذربایجان شرقی
  { name: "تبریز", province: "آذربایجان شرقی", position: [38.0962, 46.2738] },
  { name: "مراغه", province: "آذربایجان شرقی", position: [37.3897, 46.2397] },
  { name: "مرند", province: "آذربایجان شرقی", position: [38.4308, 45.7697] },
  { name: "میانه", province: "آذربایجان شرقی", position: [37.4233, 47.7144] },
  { name: "اهر", province: "آذربایجان شرقی", position: [38.4764, 47.0697] },
  { name: "سراب", province: "آذربایجان شرقی", position: [37.9403, 47.5358] },
  { name: "بناب", province: "آذربایجان شرقی", position: [37.3403, 46.0558] },
  { name: "هشترود", province: "آذربایجان شرقی", position: [37.4764, 47.0497] },
  { name: "ملکان", province: "آذربایجان شرقی", position: [37.1403, 46.1058] },
  { name: "بستان‌آباد", province: "آذربایجان شرقی", position: [37.8403, 46.8258] },
  { name: "شبستر", province: "آذربایجان شرقی", position: [38.1803, 45.7058] },

  // آذربایجان غربی
  { name: "ارومیه", province: "آذربایجان غربی", position: [37.5495, 45.0762] },
  { name: "خوی", province: "آذربایجان غربی", position: [38.5503, 44.9558] },
  { name: "مهاباد", province: "آذربایجان غربی", position: [36.7636, 45.7222] },
  { name: "میاندوآب", province: "آذربایجان غربی", position: [36.9697, 46.1031] },
  { name: "بوکان", province: "آذربایجان غربی", position: [36.5211, 46.2086] },
  { name: "سلماس", province: "آذربایجان غربی", position: [38.1978, 44.7658] },
  { name: "پیرانشهر", province: "آذربایجان غربی", position: [36.7011, 45.1419] },
  { name: "نقده", province: "آذربایجان غربی", position: [36.9553, 45.3886] },
  { name: "سردشت", province: "آذربایجان غربی", position: [36.1547, 45.4772] },
  { name: "ماکو", province: "آذربایجان غربی", position: [39.2953, 44.4858] },
  { name: "شاهین‌دژ", province: "آذربایجان غربی", position: [36.6803, 46.5658] },
  { name: "تکاب", province: "آذربایجان غربی", position: [36.4003, 47.1158] },
  { name: "اشنویه", province: "آذربایجان غربی", position: [37.0403, 45.0958] },
  { name: "چالدران", province: "آذربایجان غربی", position: [39.0653, 44.3858] },

  // اردبیل
  { name: "اردبیل", province: "اردبیل", position: [38.2514, 48.2973] },
  { name: "پارس‌آباد", province: "اردبیل", position: [39.6486, 47.9175] },
  { name: "مشگین‌شهر", province: "اردبیل", position: [38.3986, 47.6675] },
  { name: "خلخال", province: "اردبیل", position: [37.6203, 48.5258] },
  { name: "گرمی", province: "اردبیل", position: [39.0303, 48.0858] },
  { name: "بیله‌سوار", province: "اردبیل", position: [39.3803, 48.3458] },
  { name: "نمین", province: "اردبیل", position: [38.4303, 48.4858] },
  { name: "نیر", province: "اردبیل", position: [38.0303, 48.0158] },

  // اصفهان
  { name: "اصفهان", province: "اصفهان", position: [32.6546, 51.668] },
  { name: "کاشان", province: "اصفهان", position: [33.9831, 51.4364] },
  { name: "خمینی‌شهر", province: "اصفهان", position: [32.7, 51.5208] },
  { name: "نجف‌آباد", province: "اصفهان", position: [32.6342, 51.3669] },
  { name: "شاهین‌شهر", province: "اصفهان", position: [32.8597, 51.5497] },
  { name: "فلاورجان", province: "اصفهان", position: [32.5553, 51.5058] },
  { name: "لنجان", province: "اصفهان", position: [32.4553, 51.2058] },
  { name: "آران و بیدگل", province: "اصفهان", position: [34.0575, 51.4822] },
  { name: "گلپایگان", province: "اصفهان", position: [33.4536, 50.2881] },
  { name: "مبارکه", province: "اصفهان", position: [32.3453, 51.5058] },
  { name: "شهرضا", province: "اصفهان", position: [32.0097, 51.8656] },
  { name: "فریدن", province: "اصفهان", position: [32.9303, 50.1258] },
  { name: "نائین", province: "اصفهان", position: [32.8575, 53.0892] },
  { name: "تیران", province: "اصفهان", position: [32.7053, 51.1558] },
  { name: "سمیرم", province: "اصفهان", position: [31.4153, 51.5758] },
  { name: "اردستان", province: "اصفهان", position: [33.3775, 52.3692] },

  // البرز
  { name: "کرج", province: "البرز", position: [35.8325, 50.9915] },
  { name: "فردیس", province: "البرز", position: [35.7203, 50.9858] },
  { name: "نظرآباد", province: "البرز", position: [35.9525, 50.6115] },
  { name: "هشتگرد", province: "البرز", position: [35.9603, 50.6858] },
  { name: "ساوجبلاغ", province: "البرز", position: [35.9003, 50.5858] },
  { name: "طالقان", province: "البرز", position: [36.1703, 50.7658] },
  { name: "اشتهارد", province: "البرز", position: [35.7203, 50.3558] },

  // ایلام
  { name: "ایلام", province: "ایلام", position: [33.6374, 46.4227] },
  { name: "دهلران", province: "ایلام", position: [32.6842, 47.2675] },
  { name: "مهران", province: "ایلام", position: [33.1222, 46.1647] },
  { name: "ایوان", province: "ایلام", position: [33.8303, 46.3058] },
  { name: "آبدانان", province: "ایلام", position: [32.9903, 47.4158] },
  { name: "دره‌شهر", province: "ایلام", position: [33.1453, 47.3758] },

  // بوشهر
  { name: "بوشهر", province: "بوشهر", position: [28.9684, 50.8385] },
  { name: "برازجان", province: "بوشهر", position: [29.2642, 51.2175] },
  { name: "کنگان", province: "بوشهر", position: [27.8342, 52.0675] },
  { name: "دیر", province: "بوشهر", position: [27.8442, 51.9375] },
  { name: "جم", province: "بوشهر", position: [27.8242, 52.3275] },
  { name: "گناوه", province: "بوشهر", position: [29.5803, 50.5158] },
  { name: "دشتستان", province: "بوشهر", position: [29.2703, 51.2158] },
  { name: "تنگستان", province: "بوشهر", position: [28.9303, 51.2658] },
  { name: "دیلم", province: "بوشهر", position: [30.0503, 50.1558] },
  { name: "عسلویه", province: "بوشهر", position: [27.4742, 52.6175] },

  // تهران
  { name: "تهران", province: "تهران", position: [35.6892, 51.389] },
  { name: "شهریار", province: "تهران", position: [35.6592, 51.0589] },
  { name: "اسلامشهر", province: "تهران", position: [35.5553, 51.2347] },
  { name: "ری", province: "تهران", position: [35.5853, 51.4347] },
  { name: "پاکدشت", province: "تهران", position: [35.4653, 51.6847] },
  { name: "ورامین", province: "تهران", position: [35.3242, 51.6475] },
  { name: "قدس", province: "تهران", position: [35.7092, 51.1089] },
  { name: "ملارد", province: "تهران", position: [35.6592, 50.9789] },
  { name: "رباط‌کریم", province: "تهران", position: [35.4753, 51.0847] },
  { name: "قرچک", province: "تهران", position: [35.4353, 51.5747] },
  { name: "پردیس", province: "تهران", position: [35.7453, 51.8047] },
  { name: "پیشوا", province: "تهران", position: [35.3053, 51.7247] },
  { name: "دماوند", province: "تهران", position: [35.7053, 52.0647] },
  { name: "فیروزکوه", province: "تهران", position: [35.7553, 52.7747] },
  { name: "شمیرانات", province: "تهران", position: [35.8053, 51.4647] },
  { name: "بومهن", province: "تهران", position: [35.7303, 51.8658] },

  // چهارمحال و بختیاری
  { name: "شهرکرد", province: "چهارمحال و بختیاری", position: [32.3256, 50.8644] },
  { name: "بروجن", province: "چهارمحال و بختیاری", position: [31.9653, 51.2947] },
  { name: "فارسان", province: "چهارمحال و بختیاری", position: [32.2553, 50.5647] },
  { name: "لردگان", province: "چهارمحال و بختیاری", position: [31.5153, 50.8247] },
  { name: "اردل", province: "چهارمحال و بختیاری", position: [31.9953, 50.6547] },
  { name: "کیار", province: "چهارمحال و بختیاری", position: [32.0253, 50.1647] },
  { name: "کوهرنگ", province: "چهارمحال و بختیاری", position: [32.4353, 50.1247] },
  { name: "سامان", province: "چهارمحال و بختیاری", position: [32.4553, 50.9147] },
  { name: "بن", province: "چهارمحال و بختیاری", position: [32.5453, 50.7447] },

  // خراسان جنوبی
  { name: "بیرجند", province: "خراسان جنوبی", position: [32.8653, 59.2211] },
  { name: "قائن", province: "خراسان جنوبی", position: [33.7264, 59.1847] },
  { name: "طبس", province: "خراسان جنوبی", position: [33.5986, 56.9247] },
  { name: "فردوس", province: "خراسان جنوبی", position: [34.0186, 58.1747] },
  { name: "نهبندان", province: "خراسان جنوبی", position: [31.5386, 60.0347] },
  { name: "سربیشه", province: "خراسان جنوبی", position: [32.5786, 59.7947] },
  { name: "درمیان", province: "خراسان جنوبی", position: [33.0486, 59.9047] },
  { name: "سرایان", province: "خراسان جنوبی", position: [33.8686, 58.5247] },
  { name: "بشرویه", province: "خراسان جنوبی", position: [33.8586, 57.4247] },
  { name: "خوسف", province: "خراسان جنوبی", position: [32.7786, 58.8947] },

  // خراسان رضوی
  { name: "مشهد", province: "خراسان رضوی", position: [36.2605, 59.6168] },
  { name: "نیشابور", province: "خراسان رضوی", position: [36.2136, 58.7962] },
  { name: "سبزوار", province: "خراسان رضوی", position: [36.2128, 57.6819] },
  { name: "تربت‌حیدریه", province: "خراسان رضوی", position: [35.2742, 59.2186] },
  { name: "قوچان", province: "خراسان رضوی", position: [37.1064, 58.5097] },
  { name: "کاشمر", province: "خراسان رضوی", position: [35.2386, 58.4547] },
  { name: "گناباد", province: "خراسان رضوی", position: [34.3528, 58.6836] },
  { name: "تربت‌جام", province: "خراسان رضوی", position: [35.2442, 60.6286] },
  { name: "چناران", province: "خراسان رضوی", position: [36.6464, 59.1197] },
  { name: "خواف", province: "خراسان رضوی", position: [34.5742, 60.1386] },
  { name: "درگز", province: "خراسان رضوی", position: [37.4464, 59.1097] },
  { name: "تایباد", province: "خراسان رضوی", position: [34.7342, 60.7786] },
  { name: "فریمان", province: "خراسان رضوی", position: [35.7064, 59.8497] },
  { name: "سرخس", province: "خراسان رضوی", position: [36.5464, 61.1597] },
  { name: "بردسکن", province: "خراسان رضوی", position: [35.2586, 57.9747] },
  { name: "رشتخوار", province: "خراسان رضوی", position: [34.9742, 59.6286] },
  { name: "مه‌ولات", province: "خراسان رضوی", position: [35.0286, 58.7847] },
  { name: "جغتای", province: "خراسان رضوی", position: [36.6264, 57.0697] },
  { name: "جوین", province: "خراسان رضوی", position: [36.6064, 57.4597] },
  { name: "خلیل‌آباد", province: "خراسان رضوی", position: [35.2386, 58.1347] },
  { name: "بجستان", province: "خراسان رضوی", position: [34.5186, 58.1847] },
  { name: "باخرز", province: "خراسان رضوی", position: [34.9842, 60.3886] },
  { name: "زاوه", province: "خراسان رضوی", position: [35.1642, 59.6786] },
  { name: "فیروزه", province: "خراسان رضوی", position: [36.2486, 58.5147] },
  { name: "کلات", province: "خراسان رضوی", position: [36.9864, 59.7597] },

  // خراسان شمالی
  { name: "بجنورد", province: "خراسان شمالی", position: [37.4747, 57.3292] },
  { name: "شیروان", province: "خراسان شمالی", position: [37.3964, 57.9297] },
  { name: "اسفراین", province: "خراسان شمالی", position: [37.0764, 57.5197] },
  { name: "جاجرم", province: "خراسان شمالی", position: [36.9564, 56.3797] },
  { name: "مانه و سملقان", province: "خراسان شمالی", position: [37.4264, 56.6897] },
  { name: "فاروج", province: "خراسان شمالی", position: [37.2264, 58.2297] },
  { name: "راز و جرگلان", province: "خراسان شمالی", position: [37.9164, 57.0897] },
  { name: "گرمه", province: "خراسان شمالی", position: [37.4064, 55.8697] },

  // خوزستان
  { name: "اهواز", province: "خوزستان", position: [31.3183, 48.6706] },
  { name: "آبادان", province: "خوزستان", position: [30.3392, 48.2973] },
  { name: "خرمشهر", province: "خوزستان", position: [30.4392, 48.1673] },
  { name: "دزفول", province: "خوزستان", position: [32.3839, 48.4058] },
  { name: "اندیمشک", province: "خوزستان", position: [32.4639, 48.3558] },
  { name: "ماهشهر", province: "خوزستان", position: [30.5592, 49.1973] },
  { name: "شوشتر", province: "خوزستان", position: [32.0439, 48.8558] },
  { name: "شوش", province: "خوزستان", position: [32.1939, 48.2558] },
  { name: "ایذه", province: "خوزستان", position: [31.8339, 49.8758] },
  { name: "بهبهان", province: "خوزستان", position: [30.5939, 50.2458] },
  { name: "مسجدسلیمان", province: "خوزستان", position: [31.9339, 49.3058] },
  { name: "رامهرمز", province: "خوزستان", position: [31.2739, 49.6058] },
  { name: "شادگان", province: "خوزستان", position: [30.6492, 48.6673] },
  { name: "امیدیه", province: "خوزستان", position: [30.7592, 49.7073] },
  { name: "سوسنگرد", province: "خوزستان", position: [31.5592, 48.1873] },
  { name: "هویزه", province: "خوزستان", position: [31.4592, 48.0773] },
  { name: "هندیجان", province: "خوزستان", position: [30.2392, 49.7173] },
  { name: "گتوند", province: "خوزستان", position: [32.2439, 48.8158] },
  { name: "باوی", province: "خوزستان", position: [31.5292, 48.7773] },
  { name: "کارون", province: "خوزستان", position: [31.3792, 48.8073] },
  { name: "لالی", province: "خوزستان", position: [32.3239, 49.0858] },
  { name: "هفتگل", province: "خوزستان", position: [31.4339, 49.5358] },
  { name: "آغاجاری", province: "خوزستان", position: [30.6939, 49.8258] },
  { name: "رامشیر", province: "خوزستان", position: [30.8939, 49.4158] },
  { name: "باغ‌ملک", province: "خوزستان", position: [31.5239, 49.8858] },

  // زنجان
  { name: "زنجان", province: "زنجان", position: [36.6736, 48.4787] },
  { name: "ابهر", province: "زنجان", position: [36.1464, 49.2197] },
  { name: "خرمدره", province: "زنجان", position: [36.2064, 49.1997] },
  { name: "قیدار", province: "زنجان", position: [36.1264, 48.5797] },
  { name: "ماه‌نشان", province: "زنجان", position: [36.7464, 47.6697] },
  { name: "طارم", province: "زنجان", position: [36.9164, 49.1197] },
  { name: "ایجرود", province: "زنجان", position: [36.3664, 48.2697] },
  { name: "سلطانیه", province: "زنجان", position: [36.4364, 48.7997] },

  // سمنان
  { name: "سمنان", province: "سمنان", position: [35.5769, 53.3975] },
  { name: "شاهرود", province: "سمنان", position: [36.4186, 54.9747] },
  { name: "دامغان", province: "سمنان", position: [36.1686, 54.3447] },
  { name: "گرمسار", province: "سمنان", position: [35.2186, 52.3447] },
  { name: "مهدی‌شهر", province: "سمنان", position: [35.7086, 53.3647] },
  { name: "آرادان", province: "سمنان", position: [35.2486, 52.4947] },
  { name: "سرخه", province: "سمنان", position: [35.4686, 53.2247] },
  { name: "میامی", province: "سمنان", position: [36.4586, 55.6947] },

  // سیستان و بلوچستان
  { name: "زاهدان", province: "سیستان و بلوچستان", position: [29.4963, 60.8629] },
  { name: "چابهار", province: "سیستان و بلوچستان", position: [25.2919, 60.6431] },
  { name: "زابل", province: "سیستان و بلوچستان", position: [31.0286, 61.5047] },
  { name: "ایرانشهر", province: "سیستان و بلوچستان", position: [27.2025, 60.685] },
  { name: "سراوان", province: "سیستان و بلوچستان", position: [27.3642, 62.3275] },
  { name: "خاش", province: "سیستان و بلوچستان", position: [28.2208, 61.2139] },
  { name: "کنارک", province: "سیستان و بلوچستان", position: [25.3519, 60.3931] },
  { name: "نیکشهر", province: "سیستان و بلوچستان", position: [26.2242, 60.2175] },
  { name: "سرباز", province: "سیستان و بلوچستان", position: [26.6342, 61.2775] },
  { name: "دلگان", province: "سیستان و بلوچستان", position: [27.1442, 59.4175] },
  { name: "زهک", province: "سیستان و بلوچستان", position: [30.8886, 61.6847] },
  { name: "هیرمند", province: "سیستان و بلوچستان", position: [31.2186, 61.7747] },
  { name: "نیمروز", province: "سیستان و بلوچستان", position: [31.0486, 61.4047] },
  { name: "میرجاوه", province: "سیستان و بلوچستان", position: [29.0142, 61.4575] },
  { name: "فنوج", province: "سیستان و بلوچستان", position: [26.5742, 59.6375] },
  { name: "مهرستان", province: "سیستان و بلوچستان", position: [27.1842, 62.1175] },
  { name: "قصرقند", province: "سیستان و بلوچستان", position: [26.2542, 60.7775] },

  // فارس
  { name: "شیراز", province: "فارس", position: [29.5926, 52.5836] },
  { name: "مرودشت", province: "فارس", position: [29.8742, 52.8086] },
  { name: "جهرم", province: "فارس", position: [28.4997, 53.5608] },
  { name: "فسا", province: "فارس", position: [28.9381, 53.6475] },
  { name: "کازرون", province: "فارس", position: [29.6186, 51.6547] },
  { name: "لار", province: "فارس", position: [27.6828, 54.3392] },
  { name: "داراب", province: "فارس", position: [28.7519, 54.5486] },
  { name: "نی‌ریز", province: "فارس", position: [29.1997, 54.3308] },
  { name: "اقلید", province: "فارس", position: [30.8986, 52.6847] },
  { name: "آباده", province: "فارس", position: [31.1608, 52.6497] },
  { name: "فیروزآباد", province: "فارس", position: [28.8442, 52.5686] },
  { name: "ممسنی", province: "فارس", position: [30.1142, 51.5686] },
  { name: "سپیدان", province: "فارس", position: [30.2542, 51.9886] },
  { name: "استهبان", province: "فارس", position: [29.1242, 54.0486] },
  { name: "خرم‌بید", province: "فارس", position: [30.8242, 53.0486] },
  { name: "لامرد", province: "فارس", position: [27.3528, 53.1892] },
  { name: "قیروکارزین", province: "فارس", position: [28.4742, 52.8786] },
  { name: "زرین‌دشت", province: "فارس", position: [28.3542, 54.4186] },
  { name: "بوانات", province: "فارس", position: [30.4742, 53.6586] },
  { name: "خنج", province: "فارس", position: [27.8828, 53.4392] },
  { name: "پاسارگاد", province: "فارس", position: [30.2042, 53.1786] },
  { name: "رستم", province: "فارس", position: [30.2142, 51.3486] },
  { name: "ارسنجان", province: "فارس", position: [29.9142, 53.3086] },
  { name: "سروستان", province: "فارس", position: [29.2742, 53.2286] },
  { name: "مهر", province: "فارس", position: [27.5528, 52.8592] },
  { name: "کوار", province: "فارس", position: [29.1942, 52.6986] },
  { name: "خرامه", province: "فارس", position: [29.5042, 53.3186] },

  // قزوین
  { name: "قزوین", province: "قزوین", position: [36.2797, 50.0049] },
  { name: "تاکستان", province: "قزوین", position: [36.0664, 49.6997] },
  { name: "آبیک", province: "قزوین", position: [36.0264, 50.5397] },
  { name: "البرز", province: "قزوین", position: [36.2464, 50.0697] },
  { name: "بویین‌زهرا", province: "قزوین", position: [35.7664, 50.0597] },
  { name: "آوج", province: "قزوین", position: [35.5764, 49.2297] },

  // قم
  { name: "قم", province: "قم", position: [34.6416, 50.8746] },

  // کردستان
  { name: "سنندج", province: "کردستان", position: [35.3219, 46.9862] },
  { name: "سقز", province: "کردستان", position: [36.2464, 46.2697] },
  { name: "مریوان", province: "کردستان", position: [35.5264, 46.1797] },
  { name: "بانه", province: "کردستان", position: [35.9964, 45.8897] },
  { name: "قروه", province: "کردستان", position: [35.1664, 47.8097] },
  { name: "بیجار", province: "کردستان", position: [35.8764, 47.6197] },
  { name: "کامیاران", province: "کردستان", position: [34.7964, 46.9397] },
  { name: "دیواندره", province: "کردستان", position: [35.9164, 47.0297] },
  { name: "دهگلان", province: "کردستان", position: [35.2764, 47.4197] },
  { name: "سروآباد", province: "کردستان", position: [35.2964, 46.3797] },

  // کرمان
  { name: "کرمان", province: "کرمان", position: [30.2839, 57.0834] },
  { name: "رفسنجان", province: "کرمان", position: [30.4064, 55.9947] },
  { name: "سیرجان", province: "کرمان", position: [29.4519, 55.6808] },
  { name: "جیرفت", province: "کرمان", position: [28.6764, 57.7397] },
  { name: "بم", province: "کرمان", position: [29.1064, 58.3547] },
  { name: "زرند", province: "کرمان", position: [30.8164, 56.5647] },
  { name: "کهنوج", province: "کرمان", position: [27.9464, 57.7097] },
  { name: "بردسیر", province: "کرمان", position: [29.9264, 56.5747] },
  { name: "شهربابک", province: "کرمان", position: [30.1164, 55.1247] },
  { name: "بافت", province: "کرمان", position: [29.2364, 56.6047] },
  { name: "راور", province: "کرمان", position: [31.2664, 56.8047] },
  { name: "عنبرآباد", province: "کرمان", position: [28.4664, 57.8597] },
  { name: "رودبار جنوب", province: "کرمان", position: [28.0364, 57.1097] },
  { name: "قلعه‌گنج", province: "کرمان", position: [27.5264, 57.8897] },
  { name: "منوجان", province: "کرمان", position: [27.4164, 57.5097] },
  { name: "رابر", province: "کرمان", position: [29.2964, 56.9147] },
  { name: "فهرج", province: "کرمان", position: [28.9564, 58.8647] },
  { name: "نرماشیر", province: "کرمان", position: [28.8964, 59.1847] },
  { name: "ریگان", province: "کرمان", position: [28.4264, 59.3047] },
  { name: "فاریاب", province: "کرمان", position: [28.1064, 57.2097] },
  { name: "ارزوئیه", province: "کرمان", position: [28.4464, 56.3497] },
  { name: "انار", province: "کرمان", position: [30.8764, 55.2647] },

  // کرمانشاه
  { name: "کرمانشاه", province: "کرمانشاه", position: [34.3142, 47.065] },
  { name: "اسلام‌آباد غرب", province: "کرمانشاه", position: [34.1164, 46.5297] },
  { name: "هرسین", province: "کرمانشاه", position: [34.2664, 47.5897] },
  { name: "سنقر", province: "کرمانشاه", position: [34.7864, 47.6097] },
  { name: "کنگاور", province: "کرمانشاه", position: [34.5064, 47.9697] },
  { name: "صحنه", province: "کرمانشاه", position: [34.4864, 47.6897] },
  { name: "جوانرود", province: "کرمانشاه", position: [34.8064, 46.5097] },
  { name: "پاوه", province: "کرمانشاه", position: [35.0464, 46.3697] },
  { name: "سرپل ذهاب", province: "کرمانشاه", position: [34.4564, 45.8697] },
  { name: "گیلانغرب", province: "کرمانشاه", position: [34.1464, 45.9297] },
  { name: "قصرشیرین", province: "کرمانشاه", position: [34.5164, 45.5797] },
  { name: "ثلاث باباجانی", province: "کرمانشاه", position: [34.7364, 46.1397] },
  { name: "دالاهو", province: "کرمانشاه", position: [34.4164, 46.2297] },
  { name: "روانسر", province: "کرمانشاه", position: [34.7164, 46.6597] },

  // کهگیلویه و بویراحمد
  { name: "یاسوج", province: "کهگیلویه و بویراحمد", position: [30.6683, 51.5881] },
  { name: "دوگنبدان", province: "کهگیلویه و بویراحمد", position: [30.3583, 50.7981] },
  { name: "دهدشت", province: "کهگیلویه و بویراحمد", position: [30.7883, 50.5681] },
  { name: "لیکک", province: "کهگیلویه و بویراحمد", position: [30.8983, 50.1381] },
  { name: "باشت", province: "کهگیلویه و بویراحمد", position: [30.3683, 51.1581] },
  { name: "چرام", province: "کهگیلویه و بویراحمد", position: [30.7483, 50.7381] },
  { name: "لنده", province: "کهگیلویه و بویراحمد", position: [30.3383, 50.4281] },
  { name: "دنا", province: "کهگیلویه و بویراحمد", position: [30.9383, 51.4181] },
  { name: "مارگون", province: "کهگیلویه و بویراحمد", position: [30.7683, 51.7781] },

  // گلستان
  { name: "گرگان", province: "گلستان", position: [36.8427, 54.4353] },
  { name: "گنبدکاووس", province: "گلستان", position: [37.2497, 55.1672] },
  { name: "علی‌آباد کتول", province: "گلستان", position: [36.9064, 54.8697] },
  { name: "آق‌قلا", province: "گلستان", position: [37.0164, 54.4597] },
  { name: "مینودشت", province: "گلستان", position: [37.2364, 55.3897] },
  { name: "کردکوی", province: "گلستان", position: [36.7864, 54.0997] },
  { name: "آزادشهر", province: "گلستان", position: [37.0864, 55.1697] },
  { name: "بندرگز", province: "گلستان", position: [36.7764, 53.9497] },
  { name: "کلاله", province: "گلستان", position: [37.3764, 55.4897] },
  { name: "رامیان", province: "گلستان", position: [37.0164, 55.1397] },
  { name: "ترکمن", province: "گلستان", position: [36.8964, 54.0697] },
  { name: "بندرترکمن", province: "گلستان", position: [36.8964, 54.0697] },
  { name: "گمیشان", province: "گلستان", position: [37.0764, 54.0897] },
  { name: "مراوه‌تپه", province: "گلستان", position: [37.9164, 55.9597] },
  { name: "گالیکش", province: "گلستان", position: [37.2764, 55.4397] },

  // گیلان
  { name: "رشت", province: "گیلان", position: [37.2682, 49.5891] },
  { name: "انزلی", province: "گیلان", position: [37.4728, 49.4622] },
  { name: "لاهیجان", province: "گیلان", position: [37.2097, 50.0053] },
  { name: "لنگرود", province: "گیلان", position: [37.1997, 50.1553] },
  { name: "رودسر", province: "گیلان", position: [37.1397, 50.2953] },
  { name: "تالش", province: "گیلان", position: [37.7997, 48.9053] },
  { name: "آستارا", province: "گیلان", position: [38.4297, 48.8753] },
  { name: "صومعه‌سرا", province: "گیلان", position: [37.3097, 49.3153] },
  { name: "فومن", province: "گیلان", position: [37.2297, 49.3153] },
  { name: "آستانه اشرفیه", province: "گیلان", position: [37.2697, 49.9453] },
  { name: "رودبار", province: "گیلان", position: [36.8197, 49.4153] },
  { name: "ماسال", province: "گیلان", position: [37.3597, 49.1353] },
  { name: "شفت", province: "گیلان", position: [37.1597, 49.4053] },
  { name: "سیاهکل", province: "گیلان", position: [37.1497, 49.8653] },
  { name: "رضوانشهر", province: "گیلان", position: [37.5497, 49.1353] },
  { name: "املش", province: "گیلان", position: [37.1097, 50.1853] },

  // لرستان
  { name: "خرم‌آباد", province: "لرستان", position: [33.4878, 48.3558] },
  { name: "بروجرد", province: "لرستان", position: [33.8978, 48.7558] },
  { name: "دورود", province: "لرستان", position: [33.4978, 49.0558] },
  { name: "الیگودرز", province: "لرستان", position: [33.4078, 49.6958] },
  { name: "ازنا", province: "لرستان", position: [33.4578, 49.4558] },
  { name: "نورآباد", province: "لرستان", position: [34.0678, 47.9658] },
  { name: "کوهدشت", province: "لرستان", position: [33.5378, 47.6058] },
  { name: "پلدختر", province: "لرستان", position: [33.1578, 47.7158] },
  { name: "الشتر", province: "لرستان", position: [33.8578, 48.2658] },
  { name: "رومشکان", province: "لرستان", position: [33.7478, 47.4658] },
  { name: "چگنی", province: "لرستان", position: [33.4278, 48.1058] },

  // مازندران
  { name: "ساری", province: "مازندران", position: [36.5631, 53.0601] },
  { name: "بابل", province: "مازندران", position: [36.5514, 52.6786] },
  { name: "آمل", province: "مازندران", position: [36.4697, 52.3503] },
  { name: "قائم‌شهر", province: "مازندران", position: [36.4614, 52.8586] },
  { name: "بابلسر", province: "مازندران", position: [36.7014, 52.6486] },
  { name: "تنکابن", province: "مازندران", position: [36.8097, 50.8753] },
  { name: "رامسر", province: "مازندران", position: [36.9097, 50.6553] },
  { name: "چالوس", province: "مازندران", position: [36.6597, 51.4153] },
  { name: "نوشهر", province: "مازندران", position: [36.6497, 51.4953] },
  { name: "نور", province: "مازندران", position: [36.5797, 52.0153] },
  { name: "محمودآباد", province: "مازندران", position: [36.6297, 52.2553] },
  { name: "جویبار", province: "مازندران", position: [36.6414, 52.9186] },
  { name: "بهشهر", province: "مازندران", position: [36.6897, 53.5503] },
  { name: "نکا", province: "مازندران", position: [36.6597, 53.2903] },
  { name: "عباس‌آباد", province: "مازندران", position: [36.7297, 51.1053] },
  { name: "سوادکوه", province: "مازندران", position: [36.2697, 52.8953] },
  { name: "کلاردشت", province: "مازندران", position: [36.5097, 51.1553] },
  { name: "سیمرغ", province: "مازندران", position: [36.3597, 52.7353] },
  { name: "گلوگاه", province: "مازندران", position: [36.7297, 53.8003] },
  { name: "فریدون‌کنار", province: "مازندران", position: [36.6814, 52.5186] },
  { name: "میاندورود", province: "مازندران", position: [36.5797, 53.2003] },
  { name: "مرزن‌آباد", province: "مازندران", position: [36.4497, 51.3053] },
  { name: "کیاکلا", province: "مازندران", position: [36.6497, 52.4353] },

  // مرکزی
  { name: "اراک", province: "مرکزی", position: [34.0954, 49.7013] },
  { name: "ساوه", province: "مرکزی", position: [35.0242, 50.3575] },
  { name: "خمین", province: "مرکزی", position: [33.6464, 50.0797] },
  { name: "محلات", province: "مرکزی", position: [33.9064, 50.4597] },
  { name: "دلیجان", province: "مرکزی", position: [33.9864, 50.6897] },
  { name: "تفرش", province: "مرکزی", position: [34.6964, 50.0197] },
  { name: "آشتیان", province: "مرکزی", position: [34.5264, 50.0097] },
  { name: "شازند", province: "مرکزی", position: [33.9264, 49.3997] },
  { name: "کمیجان", province: "مرکزی", position: [34.7264, 49.3197] },
  { name: "زرندیه", province: "مرکزی", position: [35.3964, 50.3397] },
  { name: "خنداب", province: "مرکزی", position: [34.4164, 49.0297] },
  { name: "فراهان", province: "مرکزی", position: [34.5064, 49.7397] },

  // هرمزگان
  { name: "بندرعباس", province: "هرمزگان", position: [27.1832, 56.2667] },
  { name: "میناب", province: "هرمزگان", position: [27.1064, 57.0797] },
  { name: "قشم", province: "هرمزگان", position: [26.9564, 56.2697] },
  { name: "بندرلنگه", province: "هرمزگان", position: [26.5564, 54.8797] },
  { name: "حاجی‌آباد", province: "هرمزگان", position: [28.3164, 55.9097] },
  { name: "رودان", province: "هرمزگان", position: [27.4564, 57.1897] },
  { name: "بستک", province: "هرمزگان", position: [27.1964, 54.3697] },
  { name: "جاسک", province: "هرمزگان", position: [25.6464, 57.7797] },
  { name: "خمیر", province: "هرمزگان", position: [26.9564, 55.5997] },
  { name: "پارسیان", province: "هرمزگان", position: [27.2064, 53.0497] },
  { name: "کیش", province: "هرمزگان", position: [26.5364, 54.0197] },
  { name: "ابوموسی", province: "هرمزگان", position: [25.8764, 55.0297] },
  { name: "سیریک", province: "هرمزگان", position: [26.5364, 57.1097] },
  { name: "بشاگرد", province: "هرمزگان", position: [26.5864, 58.2497] },

  // همدان
  { name: "همدان", province: "همدان", position: [34.7983, 48.5148] },
  { name: "ملایر", province: "همدان", position: [34.2978, 48.8258] },
  { name: "نهاوند", province: "همدان", position: [34.1978, 48.3758] },
  { name: "تویسرکان", province: "همدان", position: [34.5478, 48.4458] },
  { name: "اسدآباد", province: "همدان", position: [34.7778, 48.1258] },
  { name: "کبودرآهنگ", province: "همدان", position: [35.2078, 48.7258] },
  { name: "بهار", province: "همدان", position: [34.9078, 48.4458] },
  { name: "رزن", province: "همدان", position: [35.3878, 49.0358] },
  { name: "فامنین", province: "همدان", position: [35.1078, 49.1058] },

  // یزد
  { name: "یزد", province: "یزد", position: [31.8974, 54.3569] },
  { name: "میبد", province: "یزد", position: [32.2475, 54.0169] },
  { name: "اردکان", province: "یزد", position: [32.3075, 54.0169] },
  { name: "تفت", province: "یزد", position: [31.7475, 54.2069] },
  { name: "مهریز", province: "یزد", position: [31.5875, 54.4369] },
  { name: "بافق", province: "یزد", position: [31.6075, 55.4069] },
  { name: "ابرکوه", province: "یزد", position: [31.1275, 53.2869] },
  { name: "خاتم", province: "یزد", position: [30.3075, 54.3869] },
  { name: "اشکذر", province: "یزد", position: [32.0175, 54.2069] },
  { name: "بهاباد", province: "یزد", position: [31.8775, 56.0269] },
];

// Get unique provinces
export const iranianProvinces = [...new Set(iranianCities.map(city => city.province))].sort();

// Get cities by province
export function getCitiesByProvince(province: string): IranianCity[] {
  return iranianCities.filter(city => city.province === province);
}

// Search cities by name
export function searchCities(term: string): IranianCity[] {
  if (!term) return iranianCities;
  return iranianCities.filter(city =>
    city.name.includes(term) || city.province.includes(term)
  );
}
