/** * Represents a city with English, Arabic, and French names */ interface City { name: string; nameAr: string; nameFr: string; } /** * Represents a country with its code, names, and cities */ interface Country { code: string; name: string; nameAr: string; nameFr: string; cities: City[]; } /** * Language type for queries */ type Language = 'en' | 'ar' | 'fr'; /** * All countries from all continents (250 countries total with 5099 states/provinces) */ declare const allCountries: Country[]; declare const africaCountries: Country[]; declare const asiaCountries: Country[]; declare const europeCountries: Country[]; declare const americasCountries: Country[]; declare const oceaniaCountries: Country[]; /** * Get a country by its ISO code * @param code - ISO country code (e.g., "EG", "SA", "US") * @returns The country object or undefined if not found * @example * ```ts * const egypt = getCountryByCode('EG'); * console.log(egypt?.name); // "Egypt" * console.log(egypt?.nameAr); // "مصر" * ``` */ declare const getCountryByCode: (code: string) => Country | undefined; /** * Get all cities for a specific country by its ISO code * @param code - ISO country code (e.g., "EG", "SA", "US") * @returns Array of cities or empty array if country not found * @example * ```ts * const cities = getCitiesByCountryCode('EG'); * console.log(cities[0]); // { name: "Cairo", nameAr: "القاهرة" } * ``` */ declare const getCitiesByCountryCode: (code: string) => City[]; /** * Get the country name in the specified language * @param code - ISO country code (e.g., "EG", "SA", "US") * @param lang - Language code: "en" for English, "ar" for Arabic, "fr" for French (default: "en") * @returns Country name in the specified language or undefined if not found * @example * ```ts * const nameEn = getCountryName('EG', 'en'); // "Egypt" * const nameAr = getCountryName('EG', 'ar'); // "مصر" * const nameFr = getCountryName('EG', 'fr'); // "Égypte" * ``` */ declare const getCountryName: (code: string, lang?: Language) => string | undefined; /** * Search for countries by name in the specified language * @param query - Search query string * @param lang - Language to search in: "en", "ar", or "fr" (default: "en") * @returns Array of matching countries * @example * ```ts * const results = searchCountries('egypt', 'en'); * const resultsAr = searchCountries('مصر', 'ar'); * const resultsFr = searchCountries('égypte', 'fr'); * ``` */ declare const searchCountries: (query: string, lang?: Language) => Country[]; /** * Search for cities by name in the specified language, optionally filtered by country * @param query - Search query string * @param countryCode - Optional ISO country code to limit search to specific country * @param lang - Language to search in: "en", "ar", or "fr" (default: "en") * @returns Array of objects containing city and its country information * @example * ```ts * // Search all cities * const allCities = searchCities('alex', undefined, 'en'); * * // Search cities in Egypt only * const egyptCities = searchCities('alex', 'EG', 'en'); * * // Search in Arabic * const citiesAr = searchCities('القاهرة', undefined, 'ar'); * * // Search in French * const citiesFr = searchCities('le caire', undefined, 'fr'); * ``` */ declare const searchCities: (query: string, countryCode?: string, lang?: Language) => Array<{ city: City; country: Country; }>; export { type City, type Country, type Language, africaCountries, allCountries, americasCountries, asiaCountries, europeCountries, getCitiesByCountryCode, getCountryByCode, getCountryName, oceaniaCountries, searchCities, searchCountries };