<?php

declare(strict_types=1);

namespace CliqThemes\StoreLocator\Geocoding;

defined('ABSPATH') || exit;

/**
 * Contract for a geocoding backend. Implementations translate between
 * human-readable addresses and coordinates.
 */
interface GeocoderInterface
{
    /**
     * Forward geocode: address -> coordinates.
     */
    public function geocode(string $address): ?GeocodeResult;

    /**
     * Reverse geocode: coordinates -> address.
     */
    public function reverse(float $latitude, float $longitude): ?GeocodeResult;

    /**
     * Stable identifier for the provider (used in cache keys).
     */
    public function id(): string;
}
