<?php

namespace Modules\AbaxisLab\Entities;

/**
 * The Abaxis / Zoetis VetScan analyzer family covered by this module.
 * All units speak ASTM E1394; each device is registered in LabCore's
 * lab_devices with its `model` set to one of these keys.
 *
 * (VetScan Imagyst is intentionally excluded — it is AI imaging, not an
 * ASTM result analyzer.)
 */
class AbaxisModelCatalog
{
    /** model key => [label, type] */
    public const MODELS = [
        'VS2'             => ['Abaxis VetScan VS2',             'chemistry'],
        'HM5'             => ['Abaxis VetScan HM5',             'hematology'],
        'HM2'             => ['Abaxis VetScan HM2',             'hematology'],
        'VSpro'           => ['Abaxis VetScan VSpro',           'coagulation'],
        'iSTAT_Alinity_v' => ['Abaxis VetScan i-STAT Alinity v','blood_gas'],
        'UA'              => ['Abaxis VetScan UA',              'urinalysis'],
        'SA'              => ['Abaxis VetScan SA',              'sediment'],
    ];

    /**
     * @return array<int,string> model labels
     */
    public static function labels(): array
    {
        return array_map(fn($m) => $m[0], self::MODELS);
    }

    public static function typeOf(string $modelKey): ?string
    {
        return self::MODELS[$modelKey][1] ?? null;
    }
}
