<?php

namespace App\Modules\HR\Attendance\Services;

use App\Modules\HR\Attendance\Contracts\BiometricPayloadNormalizer;
use App\Modules\HR\Attendance\Infrastructure\GenericBiometricNormalizer;

class BiometricNormalizerChain
{
    public function __construct(
        private readonly GenericBiometricNormalizer $generic,
    ) {}

    public function forApiType(string $apiType): BiometricPayloadNormalizer
    {
        if ($this->generic->supports($apiType)) {
            return $this->generic;
        }

        return $this->generic;
    }
}
