/** AIS geocode result feature */
export declare interface AisGeocodeResult {
    type: "Feature";
    ais_feature_type: string;
    match_type: string;
    geometry: {
        type: "Point";
        coordinates: [number, number];
    };
    properties: {
        street_address: string;
        opa_account_num?: string;
        opa_owners?: string[];
        zip_code?: string;
        pwd_parcel_id?: string;
        [key: string]: unknown;
    };
}

/** Full AIS API response */
export declare interface AisResponse {
    search_type: string;
    search_params: {
        query: string;
        [key: string]: unknown;
    };
    query: string;
    normalized: string;
    page: number;
    page_count: number;
    page_size: number;
    total_size: number;
    type: "FeatureCollection";
    features: AisGeocodeResult[];
}

/**
 * Fetch the geometry for a parcel by its ID.
 * Returns a GeoJSON FeatureCollection, or null if not found.
 */
export declare function fetchParcelGeometry(parcelId: string): Promise<ParcelFeatureCollection | null>;

/**
 * Geocode an address string via Philadelphia AIS API.
 * Returns the full AIS response object, or null if no results found.
 */
export declare function geocodeAddress(address: string): Promise<AisResponse | null>;

/**
 * GeoJSON FeatureCollection for parcel geometry
 */
export declare interface ParcelFeatureCollection {
    type: "FeatureCollection";
    features: Array<{
        type: "Feature";
        geometry: PolygonGeometry;
        properties: {
            parcelid: string;
        };
    }>;
}

/**
 * Result from querying a parcel at a point
 */
export declare interface ParcelQueryResult {
    parcelId: string;
    address: string | null;
}

/**
 * GeoJSON Polygon geometry
 */
declare interface PolygonGeometry {
    type: "Polygon";
    coordinates: number[][][];
}

/**
 * Query the PWD parcel layer at a given point.
 * Returns parcel ID and address if found, or null if no parcel at that location.
 */
export declare function queryParcelAtPoint(lng: number, lat: number): Promise<ParcelQueryResult | null>;

export { }


declare global {
    interface Window {
        deleteActivePolygon?: () => void;
        cancelDrawing?: () => void;
        finishDrawing?: () => void;
    }
}


/**
 * Augment window type with Eagleview namespace
 */
declare global {
    interface Window {
        ev?: EagleviewNamespace;
    }
}

