<?php

declare(strict_types=1);

namespace App\Module\Agency\Service\Adapter;

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

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

    public function getName(): string
    {
        return 'Demirören Haber Ajansı (DHA)';
    }

    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;
    }
}
