<?php

declare(strict_types=1);

namespace App\Module\Agency\Service\Adapter;

class IhaAdapter implements AgencyAdapterInterface
{
    private array $config = [];

    public function getSlug(): string
    {
        return 'iha';
    }

    public function getName(): string
    {
        return 'İhlas Haber Ajansı (İHA)';
    }

    public function configure(array $config): void
    {
        $this->config = $config;
    }

    public function fetchLatest(\DateTimeInterface $since): array
    {
        return [];
    }

    public function fetchById(string $externalId): ?array
    {
        return null;
    }

    public function testConnection(): bool
    {
        if (empty($this->config['api_url']) || empty($this->config['api_key'])) {
            return false;
        }

        return true;
    }
}
