285 lines
21 KiB
JavaScript
285 lines
21 KiB
JavaScript
export const countries = [
|
|
{ value: 'ir', prefix: '+98', label: 'ایران', enLabel: 'Iran', icon: 'fi fi-ir' },
|
|
{ value: 'af', prefix: '+93', label: 'افغانستان', enLabel: 'Afghanistan', icon: 'fi fi-af' },
|
|
{ value: 'al', prefix: '+355', label: 'آلبانی', enLabel: 'Albania', icon: 'fi fi-al' },
|
|
{ value: 'dz', prefix: '+213', label: 'الجزایر', enLabel: 'Algeria', icon: 'fi fi-dz' },
|
|
{ value: 'ad', prefix: '+376', label: 'آندورا', enLabel: 'Andorra', icon: 'fi fi-ad' },
|
|
{ value: 'ao', prefix: '+244', label: 'آنگولا', enLabel: 'Angola', icon: 'fi fi-ao' },
|
|
{ value: 'ag', prefix: '+1268', label: 'آنتیگوا و باربودا', enLabel: 'Antigua and Barbuda', icon: 'fi fi-ag' },
|
|
{ value: 'ar', prefix: '+54', label: 'آرژانتین', enLabel: 'Argentina', icon: 'fi fi-ar' },
|
|
{ value: 'am', prefix: '+374', label: 'ارمنستان', enLabel: 'Armenia', icon: 'fi fi-am' },
|
|
{ value: 'au', prefix: '+61', label: 'استرالیا', enLabel: 'Australia', icon: 'fi fi-au' },
|
|
{ value: 'at', prefix: '+43', label: 'اتریش', enLabel: 'Austria', icon: 'fi fi-at' },
|
|
{ value: 'az', prefix: '+994', label: 'جمهوری آذربایجان', enLabel: 'Azerbaijan', icon: 'fi fi-az' },
|
|
{ value: 'bs', prefix: '+1242', label: 'باهاما', enLabel: 'Bahamas', icon: 'fi fi-bs' },
|
|
{ value: 'bh', prefix: '+973', label: 'بحرین', enLabel: 'Bahrain', icon: 'fi fi-bh' },
|
|
{ value: 'bd', prefix: '+880', label: 'بنگلادش', enLabel: 'Bangladesh', icon: 'fi fi-bd' },
|
|
{ value: 'bb', prefix: '+1246', label: 'باربادوس', enLabel: 'Barbados', icon: 'fi fi-bb' },
|
|
{ value: 'by', prefix: '+375', label: 'بلاروس', enLabel: 'Belarus', icon: 'fi fi-by' },
|
|
{ value: 'be', prefix: '+32', label: 'بلژیک', enLabel: 'Belgium', icon: 'fi fi-be' },
|
|
{ value: 'bz', prefix: '+501', label: 'بلیز', enLabel: 'Belize', icon: 'fi fi-bz' },
|
|
{ value: 'bj', prefix: '+229', label: 'بنین', enLabel: 'Benin', icon: 'fi fi-bj' },
|
|
{ value: 'bt', prefix: '+975', label: 'بوتان', enLabel: 'Bhutan', icon: 'fi fi-bt' },
|
|
{ value: 'bo', prefix: '+591', label: 'بولیوی', enLabel: 'Bolivia', icon: 'fi fi-bo' },
|
|
{ value: 'ba', prefix: '+387', label: 'بوسنی و هرزگوین', enLabel: 'Bosnia and Herzegovina', icon: 'fi fi-ba' },
|
|
{ value: 'bw', prefix: '+267', label: 'بوتسوانا', enLabel: 'Botswana', icon: 'fi fi-bw' },
|
|
{ value: 'br', prefix: '+55', label: 'برزیل', enLabel: 'Brazil', icon: 'fi fi-br' },
|
|
{ value: 'bn', prefix: '+673', label: 'برونئی', enLabel: 'Brunei', icon: 'fi fi-bn' },
|
|
{ value: 'bg', prefix: '+359', label: 'بلغارستان', enLabel: 'Bulgaria', icon: 'fi fi-bg' },
|
|
{ value: 'bf', prefix: '+226', label: 'بورکینافاسو', enLabel: 'Burkina Faso', icon: 'fi fi-bf' },
|
|
{ value: 'bi', prefix: '+257', label: 'بوروندی', enLabel: 'Burundi', icon: 'fi fi-bi' },
|
|
{ value: 'kh', prefix: '+855', label: 'کامبوج', enLabel: 'Cambodia', icon: 'fi fi-kh' },
|
|
{ value: 'cm', prefix: '+237', label: 'کامرون', enLabel: 'Cameroon', icon: 'fi fi-cm' },
|
|
{ value: 'ca', prefix: '+1', label: 'کانادا', enLabel: 'Canada', icon: 'fi fi-ca' },
|
|
{ value: 'cv', prefix: '+238', label: 'کیپ ورد', enLabel: 'Cape Verde', icon: 'fi fi-cv' },
|
|
{ value: 'cf', prefix: '+236', label: 'جمهوری آفریقای مرکزی', enLabel: 'Central African Republic', icon: 'fi fi-cf' },
|
|
{ value: 'td', prefix: '+235', label: 'چاد', enLabel: 'Chad', icon: 'fi fi-td' },
|
|
{ value: 'cl', prefix: '+56', label: 'شیلی', enLabel: 'Chile', icon: 'fi fi-cl' },
|
|
{ value: 'cn', prefix: '+86', label: 'چین', enLabel: 'China', icon: 'fi fi-cn' },
|
|
{ value: 'co', prefix: '+57', label: 'کلمبیا', enLabel: 'Colombia', icon: 'fi fi-co' },
|
|
{ value: 'km', prefix: '+269', label: 'کومور', enLabel: 'Comoros', icon: 'fi fi-km' },
|
|
{ value: 'cg', prefix: '+242', label: 'جمهوری کنگو', enLabel: 'Republic of the Congo', icon: 'fi fi-cg' },
|
|
{ value: 'cr', prefix: '+506', label: 'کاستاریکا', enLabel: 'Costa Rica', icon: 'fi fi-cr' },
|
|
{ value: 'hr', prefix: '+385', label: 'کرواسی', enLabel: 'Croatia', icon: 'fi fi-hr' },
|
|
{ value: 'cu', prefix: '+53', label: 'کوبا', enLabel: 'Cuba', icon: 'fi fi-cu' },
|
|
{ value: 'cy', prefix: '+357', label: 'قبرس', enLabel: 'Cyprus', icon: 'fi fi-cy' },
|
|
{ value: 'cz', prefix: '+420', label: 'جمهوری چک', enLabel: 'Czech Republic', icon: 'fi fi-cz' },
|
|
{ value: 'dk', prefix: '+45', label: 'دانمارک', enLabel: 'Denmark', icon: 'fi fi-dk' },
|
|
{ value: 'dj', prefix: '+253', label: 'جیبوتی', enLabel: 'Djibouti', icon: 'fi fi-dj' },
|
|
{ value: 'dm', prefix: '+1767', label: 'دومینیکا', enLabel: 'Dominica', icon: 'fi fi-dm' },
|
|
{ value: 'do', prefix: '+1809', label: 'جمهوری دومینیکن', enLabel: 'Dominican Republic', icon: 'fi fi-do' },
|
|
{ value: 'ec', prefix: '+593', label: 'اکوادور', enLabel: 'Ecuador', icon: 'fi fi-ec' },
|
|
{ value: 'eg', prefix: '+20', label: 'مصر', enLabel: 'Egypt', icon: 'fi fi-eg' },
|
|
{ value: 'sv', prefix: '+503', label: 'السالوادور', enLabel: 'El Salvador', icon: 'fi fi-sv' },
|
|
{ value: 'gq', prefix: '+240', label: 'گینه استوایی', enLabel: 'Equatorial Guinea', icon: 'fi fi-gq' },
|
|
{ value: 'er', prefix: '+291', label: 'اریتره', enLabel: 'Eritrea', icon: 'fi fi-er' },
|
|
{ value: 'ee', prefix: '+372', label: 'استونی', enLabel: 'Estonia', icon: 'fi fi-ee' },
|
|
{ value: 'et', prefix: '+251', label: 'اتیوپی', enLabel: 'Ethiopia', icon: 'fi fi-et' },
|
|
{ value: 'fj', prefix: '+679', label: 'فیجی', enLabel: 'Fiji', icon: 'fi fi-fj' },
|
|
{ value: 'fi', prefix: '+358', label: 'فنلاند', enLabel: 'Finland', icon: 'fi fi-fi' },
|
|
{ value: 'fr', prefix: '+33', label: 'فرانسه', enLabel: 'France', icon: 'fi fi-fr' },
|
|
{ value: 'ga', prefix: '+241', label: 'گابن', enLabel: 'Gabon', icon: 'fi fi-ga' },
|
|
{ value: 'gm', prefix: '+220', label: 'گامبیا', enLabel: 'Gambia', icon: 'fi fi-gm' },
|
|
{ value: 'ge', prefix: '+995', label: 'گرجستان', enLabel: 'Georgia', icon: 'fi fi-ge' },
|
|
{ value: 'de', prefix: '+49', label: 'آلمان', enLabel: 'Germany', icon: 'fi fi-de' },
|
|
{ value: 'gh', prefix: '+233', label: 'غنا', enLabel: 'Ghana', icon: 'fi fi-gh' },
|
|
{ value: 'gr', prefix: '+30', label: 'یونان', enLabel: 'Greece', icon: 'fi fi-gr' },
|
|
{ value: 'gd', prefix: '+1473', label: 'گرنادا', enLabel: 'Grenada', icon: 'fi fi-gd' },
|
|
{ value: 'gt', prefix: '+502', label: 'گواتمالا', enLabel: 'Guatemala', icon: 'fi fi-gt' },
|
|
{ value: 'gn', prefix: '+224', label: 'گینه', enLabel: 'Guinea', icon: 'fi fi-gn' },
|
|
{ value: 'gw', prefix: '+245', label: 'گینه بیسائو', enLabel: 'Guinea-Bissau', icon: 'fi fi-gw' },
|
|
{ value: 'gy', prefix: '+592', label: 'گویان', enLabel: 'Guyana', icon: 'fi fi-gy' },
|
|
{ value: 'ht', prefix: '+509', label: 'هائیتی', enLabel: 'Haiti', icon: 'fi fi-ht' },
|
|
{ value: 'hn', prefix: '+504', label: 'هندوراس', enLabel: 'Honduras', icon: 'fi fi-hn' },
|
|
{ value: 'hu', prefix: '+36', label: 'مجارستان', enLabel: 'Hungary', icon: 'fi fi-hu' },
|
|
{ value: 'is', prefix: '+354', label: 'ایسلند', enLabel: 'Iceland', icon: 'fi fi-is' },
|
|
{ value: 'in', prefix: '+91', label: 'هند', enLabel: 'India', icon: 'fi fi-in' },
|
|
{ value: 'id', prefix: '+62', label: 'اندونزی', enLabel: 'Indonesia', icon: 'fi fi-id' },
|
|
{ value: 'iq', prefix: '+964', label: 'عراق', enLabel: 'Iraq', icon: 'fi fi-iq' },
|
|
{ value: 'ie', prefix: '+353', label: 'ایرلند', enLabel: 'Ireland', icon: 'fi fi-ie' },
|
|
{ value: 'il', prefix: '+972', label: 'اسرائیل', enLabel: 'Israel', icon: 'fi fi-il' },
|
|
{ value: 'it', prefix: '+39', label: 'ایتالیا', enLabel: 'Italy', icon: 'fi fi-it' },
|
|
{ value: 'jm', prefix: '+1876', label: 'جامائیکا', enLabel: 'Jamaica', icon: 'fi fi-jm' },
|
|
{ value: 'jp', prefix: '+81', label: 'ژاپن', enLabel: 'Japan', icon: 'fi fi-jp' },
|
|
{ value: 'jo', prefix: '+962', label: 'اردن', enLabel: 'Jordan', icon: 'fi fi-jo' },
|
|
{ value: 'kz', prefix: '+7', label: 'قزاقستان', enLabel: 'Kazakhstan', icon: 'fi fi-kz' },
|
|
{ value: 'ke', prefix: '+254', label: 'کنیا', enLabel: 'Kenya', icon: 'fi fi-ke' },
|
|
{ value: 'ki', prefix: '+686', label: 'کیریباتی', enLabel: 'Kiribati', icon: 'fi fi-ki' },
|
|
{ value: 'kw', prefix: '+965', label: 'کویت', enLabel: 'Kuwait', icon: 'fi fi-kw' },
|
|
{ value: 'kg', prefix: '+996', label: 'قرقیزستان', enLabel: 'Kyrgyzstan', icon: 'fi fi-kg' },
|
|
{ value: 'la', prefix: '+856', label: 'لائوس', enLabel: 'Laos', icon: 'fi fi-la' },
|
|
{ value: 'lv', prefix: '+371', label: 'لتونی', enLabel: 'Latvia', icon: 'fi fi-lv' },
|
|
{ value: 'lb', prefix: '+961', label: 'لبنان', enLabel: 'Lebanon', icon: 'fi fi-lb' },
|
|
{ value: 'ls', prefix: '+266', label: 'لسوتو', enLabel: 'Lesotho', icon: 'fi fi-ls' },
|
|
{ value: 'lr', prefix: '+231', label: 'لیبریا', enLabel: 'Liberia', icon: 'fi fi-lr' },
|
|
{ value: 'ly', prefix: '+218', label: 'لیبی', enLabel: 'Libya', icon: 'fi fi-ly' },
|
|
{ value: 'li', prefix: '+423', label: 'لیختناشتاین', enLabel: 'Liechtenstein', icon: 'fi fi-li' },
|
|
{ value: 'lt', prefix: '+370', label: 'لیتوانی', enLabel: 'Lithuania', icon: 'fi fi-lt' },
|
|
{ value: 'lu', prefix: '+352', label: 'لوکزامبورگ', enLabel: 'Luxembourg', icon: 'fi fi-lu' },
|
|
{ value: 'mg', prefix: '+261', label: 'ماداگاسکار', enLabel: 'Madagascar', icon: 'fi fi-mg' },
|
|
{ value: 'mw', prefix: '+265', label: 'مالاوی', enLabel: 'Malawi', icon: 'fi fi-mw' },
|
|
{ value: 'my', prefix: '+60', label: 'مالزی', enLabel: 'Malaysia', icon: 'fi fi-my' },
|
|
{ value: 'mv', prefix: '+960', label: 'مالدیو', enLabel: 'Maldives', icon: 'fi fi-mv' },
|
|
{ value: 'ml', prefix: '+223', label: 'مالی', enLabel: 'Mali', icon: 'fi fi-ml' },
|
|
{ value: 'mt', prefix: '+356', label: 'مالت', enLabel: 'Malta', icon: 'fi fi-mt' },
|
|
{ value: 'mh', prefix: '+692', label: 'جزایر مارشال', enLabel: 'Marshall Islands', icon: 'fi fi-mh' },
|
|
{ value: 'mr', prefix: '+222', label: 'موریتانی', enLabel: 'Mauritania', icon: 'fi fi-mr' },
|
|
{ value: 'mu', prefix: '+230', label: 'موریس', enLabel: 'Mauritius', icon: 'fi fi-mu' },
|
|
{ value: 'mx', prefix: '+52', label: 'مکزیک', enLabel: 'Mexico', icon: 'fi fi-mx' },
|
|
{ value: 'fm', prefix: '+691', label: 'میکرونزی', enLabel: 'Micronesia', icon: 'fi fi-fm' },
|
|
{ value: 'md', prefix: '+373', label: 'مولداوی', enLabel: 'Moldova', icon: 'fi fi-md' },
|
|
{ value: 'mc', prefix: '+377', label: 'موناکو', enLabel: 'Monaco', icon: 'fi fi-mc' },
|
|
{ value: 'mn', prefix: '+976', label: 'مغولستان', enLabel: 'Mongolia', icon: 'fi fi-mn' },
|
|
{ value: 'me', prefix: '+382', label: 'مونتهنگرو', enLabel: 'Montenegro', icon: 'fi fi-me' },
|
|
{ value: 'ma', prefix: '+212', label: 'مراکش', enLabel: 'Morocco', icon: 'fi fi-ma' },
|
|
{ value: 'mz', prefix: '+258', label: 'موزامبیک', enLabel: 'Mozambique', icon: 'fi fi-mz' },
|
|
{ value: 'mm', prefix: '+95', label: 'میانمار', enLabel: 'Myanmar', icon: 'fi fi-mm' },
|
|
{ value: 'na', prefix: '+264', label: 'نامیبیا', enLabel: 'Namibia', icon: 'fi fi-na' },
|
|
{ value: 'nr', prefix: '+674', label: 'نائورو', enLabel: 'Nauru', icon: 'fi fi-nr' },
|
|
{ value: 'np', prefix: '+977', label: 'نپال', enLabel: 'Nepal', icon: 'fi fi-np' },
|
|
{ value: 'nl', prefix: '+31', label: 'هلند', enLabel: 'Netherlands', icon: 'fi fi-nl' },
|
|
{ value: 'nz', prefix: '+64', label: 'نیوزیلند', enLabel: 'New Zealand', icon: 'fi fi-nz' },
|
|
{ value: 'ni', prefix: '+505', label: 'نیکاراگوئه', enLabel: 'Nicaragua', icon: 'fi fi-ni' },
|
|
{ value: 'ne', prefix: '+227', label: 'نیجر', enLabel: 'Niger', icon: 'fi fi-ne' },
|
|
{ value: 'ng', prefix: '+234', label: 'نیجریه', enLabel: 'Nigeria', icon: 'fi fi-ng' },
|
|
{ value: 'no', prefix: '+47', label: 'نروژ', enLabel: 'Norway', icon: 'fi fi-no' },
|
|
{ value: 'om', prefix: '+968', label: 'عمان', enLabel: 'Oman', icon: 'fi fi-om' },
|
|
{ value: 'pk', prefix: '+92', label: 'پاکستان', enLabel: 'Pakistan', icon: 'fi fi-pk' },
|
|
{ value: 'pw', prefix: '+680', label: 'پالائو', enLabel: 'Palau', icon: 'fi fi-pw' },
|
|
{ value: 'pa', prefix: '+507', label: 'پاناما', enLabel: 'Panama', icon: 'fi fi-pa' },
|
|
{ value: 'pg', prefix: '+675', label: 'پاپوآ گینه نو', enLabel: 'Papua New Guinea', icon: 'fi fi-pg' },
|
|
{ value: 'py', prefix: '+595', label: 'پاراگوئه', enLabel: 'Paraguay', icon: 'fi fi-py' },
|
|
{ value: 'pe', prefix: '+51', label: 'پرو', enLabel: 'Peru', icon: 'fi fi-pe' },
|
|
{ value: 'ph', prefix: '+63', label: 'فیلیپین', enLabel: 'Philippines', icon: 'fi fi-ph' },
|
|
{ value: 'pl', prefix: '+48', label: 'لهستان', enLabel: 'Poland', icon: 'fi fi-pl' },
|
|
{ value: 'pt', prefix: '+351', label: 'پرتغال', enLabel: 'Portugal', icon: 'fi fi-pt' },
|
|
{ value: 'qa', prefix: '+974', label: 'قطر', enLabel: 'Qatar', icon: 'fi fi-qa' },
|
|
{ value: 'ro', prefix: '+40', label: 'رومانی', enLabel: 'Romania', icon: 'fi fi-ro' },
|
|
{ value: 'ru', prefix: '+7', label: 'روسیه', enLabel: 'Russia', icon: 'fi fi-ru' },
|
|
{ value: 'rw', prefix: '+250', label: 'رواندا', enLabel: 'Rwanda', icon: 'fi fi-rw' },
|
|
{ value: 'kn', prefix: '+1869', label: 'سنت کیتس و نویس', enLabel: 'Saint Kitts and Nevis', icon: 'fi fi-kn' },
|
|
{ value: 'lc', prefix: '+1758', label: 'سنت لوسیا', enLabel: 'Saint Lucia', icon: 'fi fi-lc' },
|
|
{ value: 'vc', prefix: '+1784', label: 'سنت وینسنت و گرنادینها', enLabel: 'Saint Vincent and the Grenadines', icon: 'fi fi-vc' },
|
|
{ value: 'ws', prefix: '+685', label: 'ساموآ', enLabel: 'Samoa', icon: 'fi fi-ws' },
|
|
{ value: 'sm', prefix: '+378', label: 'سان مارینو', enLabel: 'San Marino', icon: 'fi fi-sm' },
|
|
{ value: 'st', prefix: '+239', label: 'سائوتومه و پرینسیپ', enLabel: 'Sao Tome and Principe', icon: 'fi fi-st' },
|
|
{ value: 'sa', prefix: '+966', label: 'عربستان سعودی', enLabel: 'Saudi Arabia', icon: 'fi fi-sa' },
|
|
{ value: 'sn', prefix: '+221', label: 'سنگال', enLabel: 'Senegal', icon: 'fi fi-sn' },
|
|
{ value: 'rs', prefix: '+381', label: 'صربستان', enLabel: 'Serbia', icon: 'fi fi-rs' },
|
|
{ value: 'sc', prefix: '+248', label: 'سیشل', enLabel: 'Seychelles', icon: 'fi fi-sc' },
|
|
{ value: 'sl', prefix: '+232', label: 'سیرالئون', enLabel: 'Sierra Leone', icon: 'fi fi-sl' },
|
|
{ value: 'sg', prefix: '+65', label: 'سنگاپور', enLabel: 'Singapore', icon: 'fi fi-sg' },
|
|
{ value: 'sk', prefix: '+421', label: 'اسلواکی', enLabel: 'Slovakia', icon: 'fi fi-sk' },
|
|
{ value: 'si', prefix: '+386', label: 'اسلوونی', enLabel: 'Slovenia', icon: 'fi fi-si' },
|
|
{ value: 'sb', prefix: '+677', label: 'جزایر سلیمان', enLabel: 'Solomon Islands', icon: 'fi fi-sb' },
|
|
{ value: 'so', prefix: '+252', label: 'سومالی', enLabel: 'Somalia', icon: 'fi fi-so' },
|
|
{ value: 'za', prefix: '+27', label: 'آفریقای جنوبی', enLabel: 'South Africa', icon: 'fi fi-za' },
|
|
{ value: 'kr', prefix: '+82', label: 'کره جنوبی', enLabel: 'South Korea', icon: 'fi fi-kr' },
|
|
{ value: 'es', prefix: '+34', label: 'اسپانیا', enLabel: 'Spain', icon: 'fi fi-es' },
|
|
{ value: 'lk', prefix: '+94', label: 'سریلانکا', enLabel: 'Sri Lanka', icon: 'fi fi-lk' },
|
|
{ value: 'sd', prefix: '+249', label: 'سودان', enLabel: 'Sudan', icon: 'fi fi-sd' },
|
|
{ value: 'sr', prefix: '+597', label: 'سورینام', enLabel: 'Suriname', icon: 'fi fi-sr' },
|
|
{ value: 'sz', prefix: '+268', label: 'اسواتینی', enLabel: 'Eswatini', icon: 'fi fi-sz' },
|
|
{ value: 'se', prefix: '+46', label: 'سوئد', enLabel: 'Sweden', icon: 'fi fi-se' },
|
|
{ value: 'ch', prefix: '+41', label: 'سوئیس', enLabel: 'Switzerland', icon: 'fi fi-ch' },
|
|
{ value: 'sy', prefix: '+963', label: 'سوریه', enLabel: 'Syria', icon: 'fi fi-sy' },
|
|
{ value: 'tw', prefix: '+886', label: 'تایوان', enLabel: 'Taiwan', icon: 'fi fi-tw' },
|
|
{ value: 'tj', prefix: '+992', label: 'تاجیکستان', enLabel: 'Tajikistan', icon: 'fi fi-tj' },
|
|
{ value: 'tz', prefix: '+255', label: 'تانزانیا', enLabel: 'Tanzania', icon: 'fi fi-tz' },
|
|
{ value: 'th', prefix: '+66', label: 'تایلند', enLabel: 'Thailand', icon: 'fi fi-th' },
|
|
{ value: 'tl', prefix: '+670', label: 'تیمور شرقی', enLabel: 'Timor-Leste', icon: 'fi fi-tl' },
|
|
{ value: 'tg', prefix: '+228', label: 'توگو', enLabel: 'Togo', icon: 'fi fi-tg' },
|
|
{ value: 'to', prefix: '+676', label: 'تونگا', enLabel: 'Tonga', icon: 'fi fi-to' },
|
|
{ value: 'tt', prefix: '+1868', label: 'ترینیداد و توباگو', enLabel: 'Trinidad and Tobago', icon: 'fi fi-tt' },
|
|
{ value: 'tn', prefix: '+216', label: 'تونس', enLabel: 'Tunisia', icon: 'fi fi-tn' },
|
|
{ value: 'tr', prefix: '+90', label: 'ترکیه', enLabel: 'Turkey', icon: 'fi fi-tr' },
|
|
{ value: 'tm', prefix: '+993', label: 'ترکمنستان', enLabel: 'Turkmenistan', icon: 'fi fi-tm' },
|
|
{ value: 'tv', prefix: '+688', label: 'تووالو', enLabel: 'Tuvalu', icon: 'fi fi-tv' },
|
|
{ value: 'ug', prefix: '+256', label: 'اوگاندا', enLabel: 'Uganda', icon: 'fi fi-ug' },
|
|
{ value: 'ua', prefix: '+380', label: 'اوکراین', enLabel: 'Ukraine', icon: 'fi fi-ua' },
|
|
{ value: 'ae', prefix: '+971', label: 'امارات متحده عربی', enLabel: 'United Arab Emirates', icon: 'fi fi-ae' },
|
|
{ value: 'gb', prefix: '+44', label: 'انگلیس', enLabel: 'United Kingdom', icon: 'fi fi-gb' },
|
|
{ value: 'us', prefix: '+1', label: 'آمریکا', enLabel: 'United States', icon: 'fi fi-us' },
|
|
{ value: 'uy', prefix: '+598', label: 'اروگوئه', enLabel: 'Uruguay', icon: 'fi fi-uy' },
|
|
{ value: 'uz', prefix: '+998', label: 'ازبکستان', enLabel: 'Uzbekistan', icon: 'fi fi-uz' },
|
|
{ value: 'vu', prefix: '+678', label: 'وانواتو', enLabel: 'Vanuatu', icon: 'fi fi-vu' },
|
|
{ value: 'va', prefix: '+379', label: 'واتیکان', enLabel: 'Vatican City', icon: 'fi fi-va' },
|
|
{ value: 've', prefix: '+58', label: 'ونزوئلا', enLabel: 'Venezuela', icon: 'fi fi-ve' },
|
|
{ value: 'vn', prefix: '+84', label: 'ویتنام', enLabel: 'Vietnam', icon: 'fi fi-vn' },
|
|
{ value: 'ye', prefix: '+967', label: 'یمن', enLabel: 'Yemen', icon: 'fi fi-ye' },
|
|
{ value: 'zm', prefix: '+260', label: 'زامبیا', enLabel: 'Zambia', icon: 'fi fi-zm' },
|
|
{ value: 'zw', prefix: '+263', label: 'زیمبابوه', enLabel: 'Zimbabwe', icon: 'fi fi-zw' },
|
|
|
|
]
|
|
|
|
export const searchCountries = (query) => {
|
|
if (!query) return countries
|
|
|
|
const searchTerm = query.toLowerCase().trim()
|
|
|
|
return countries.filter(country => {
|
|
if (country.label.toLowerCase().includes(searchTerm)) {
|
|
return true
|
|
}
|
|
|
|
if (country.enLabel && country.enLabel.toLowerCase().includes(searchTerm)) {
|
|
return true
|
|
}
|
|
|
|
if (country.prefix.includes(searchTerm)) {
|
|
return true
|
|
}
|
|
|
|
if (country.value.toLowerCase().includes(searchTerm)) {
|
|
return true
|
|
}
|
|
|
|
const persianSearchTerm = searchTerm.replace(/[\s\-_]/g, '')
|
|
const persianLabel = country.label.replace(/[\s\-_]/g, '').toLowerCase()
|
|
if (persianLabel.includes(persianSearchTerm)) {
|
|
return true
|
|
}
|
|
|
|
const englishSearchTerm = searchTerm.replace(/[\s\-_]/g, '')
|
|
const englishLabel = country.enLabel.replace(/[\s\-_]/g, '').toLowerCase()
|
|
if (englishLabel.includes(englishSearchTerm)) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
})
|
|
}
|
|
|
|
export const searchCountriesEnhanced = (query) => {
|
|
if (!query) return countries
|
|
|
|
const searchTerm = query.toLowerCase().trim()
|
|
|
|
if (searchTerm.length <= 2) {
|
|
return countries.filter(country =>
|
|
country.prefix.startsWith(searchTerm) ||
|
|
country.value.toLowerCase().startsWith(searchTerm)
|
|
)
|
|
}
|
|
|
|
return countries.filter(country => {
|
|
if (country.prefix === searchTerm ||
|
|
country.value.toLowerCase() === searchTerm ||
|
|
country.label.toLowerCase() === searchTerm ||
|
|
country.enLabel.toLowerCase() === searchTerm) {
|
|
return true
|
|
}
|
|
|
|
if (country.prefix.startsWith(searchTerm) ||
|
|
country.label.toLowerCase().startsWith(searchTerm) ||
|
|
country.enLabel.toLowerCase().startsWith(searchTerm)) {
|
|
return true
|
|
}
|
|
|
|
if (country.label.toLowerCase().includes(searchTerm) ||
|
|
country.enLabel.toLowerCase().includes(searchTerm) ||
|
|
country.prefix.includes(searchTerm) ||
|
|
country.value.toLowerCase().includes(searchTerm)) {
|
|
return true
|
|
}
|
|
|
|
const cleanSearchTerm = searchTerm.replace(/[\s\-_\-]/g, '')
|
|
const cleanPersianLabel = country.label.replace(/[\s\-_\-]/g, '').toLowerCase()
|
|
const cleanEnglishLabel = country.enLabel.replace(/[\s\-_\-]/g, '').toLowerCase()
|
|
|
|
if (cleanPersianLabel.includes(cleanSearchTerm) ||
|
|
cleanEnglishLabel.includes(cleanSearchTerm)) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
})
|
|
}
|
|
export const findCountryByCode = (code) => {
|
|
return countries.find(country => country.value === code.toLowerCase())
|
|
}
|
|
|
|
export const findCountryByPrefix = (prefix) => {
|
|
return countries.find(country => country.prefix === prefix)
|
|
}
|