<?php

namespace Modules\Vrc\Services\Contracts;

/**
 * ISO 18541 Repair & Maintenance Information (RMI) access. One implementation is
 * bound per business (config vrc.bindings). The default is the StubRepairInfoService;
 * swap for a commercial provider (TecRMI / HaynesPro / Autodata) adapter without
 * touching callers.
 */
interface RepairInfoServiceContract
{
    /** Decode a VIN into structured vehicle attributes. */
    public function decodeVin(string $vin): array;

    /**
     * Fetch standardized RMI for a use-case.
     *
     * @param string $useCase repair|maintenance|diagnostics|wiring|tsb|recall
     * @param array  $params  ['make','model','year','vin','query', ...]
     * @return array ['status' => 'ok|not_found|error', 'title' => ..., 'sections' => [...]]
     */
    public function lookup(string $useCase, array $params): array;

    /** Provider key for logging/UI (e.g. 'stub', 'tecrmi'). */
    public function provider(): string;
}
