declare const IP_TYPES: {
    IPV4: string;
    IPV6: string;
};

type IpTypes = (typeof IP_TYPES)[keyof typeof IP_TYPES];
interface Ip {
    ip: string | null;
    success: boolean;
    type: IpTypes | null;
    is_eu: boolean | null;
    continent: {
        name: string | null;
        code: string | null;
        country: {
            name: string | null;
            code: string | null;
            phone_code: string | null;
            capital: string | null;
            tld: string | null;
            city: {
                name: string | null;
                latitude: number | null;
                longitude: number | null;
                postal_code: string | null;
                timezone: {
                    name: string | null;
                    time_now: string | null;
                };
            };
            flag: {
                img: string | null;
                emoji: string | null;
                emoji_unicode: string | null;
            };
            currency: {
                name: string | null;
                code: string | null;
                symbol: string | null;
            };
        };
    };
    asn: {
        number: number | null;
        name: string | null;
    };
    completion_time: {
        miliseconds: number | null;
        seconds: number | null;
    };
}

/**
 * Get geo information from an IP address.
 *
 * The function fetches detailed geographical and connection-related information
 * for a given IP address. The returned data includes properties such as continent,
 * country, city, timezone, ASN details, and completion time.
 *
 * @param ip - The IP address to retrieve geo information for.
 * @returns A Promise resolving to an object of type `Ip` containing geo and connection details, or `null` if no data is found or something goes wrong.
 *
 * @typedef Ip
 * @property ip - The IP address or null if unavailable.
 * @property success - Whether the request was successful.
 * @property type - The type of IP (e.g., IPv4, IPv6) or null.
 * @property is_eu - Whether the IP is located in the European Union or null.
 * @property continent - Continent information:
 *   - name - The continent name or null.
 *   - code - The continent code or null.
 *   - country - Country information:
 *     - name - The country name or null.
 *     - code - The country code or null.
 *     - phone_code - The country phone code or null.
 *     - capital - The capital city or null.
 *     - tld - The country top-level domain or null.
 *     - city - City information:
 *       - name - The city name or null.
 *       - latitude - The city's latitude coordinate or null.
 *       - longitude - The city's longitude coordinate or null.
 *       - postal_code - The postal code or null.
 *       - timezone - Timezone information:
 *         - name - The timezone name or null.
 *         - time_now - The current time in the timezone or null.
 *     - flag - Country flag information:
 *       - img - The URL of the flag image or null.
 *       - emoji - The flag emoji or null.
 *       - emoji_unicode - The Unicode representation of the flag emoji or null.
 *     - currency - Currency information:
 *       - name - The currency name or null.
 *       - code - The currency code or null.
 *       - symbol - The currency symbol or null.
 * @property asn - Autonomous system number information:
 *   - number - The ASN number or null.
 *   - name - The ASN name or null.
 * @property completion_time - Request completion time:
 *   - miliseconds - Time in milliseconds or null.
 *   - seconds - Time in seconds or null.
*/
declare const GetGeoFromIP: (ip: string) => Promise<Ip | null>;

export { GetGeoFromIP as default, GetGeoFromIP as getGeoFromIP };
export type { Ip };
