<?php

namespace Rdgcorp\MasterFeed\Application;

use Rdgcorp\MasterFeed\Infrastructure\MasterFeedClient;

class GetDirectSports
{
    private MasterFeedClient $masterFeedClient;

    public function __construct(MasterFeedClient $masterFeedClient)
    {
        $this->masterFeedClient = $masterFeedClient;
    }

    public function __invoke(): array
    {
        $responseData = $this->masterFeedClient->getDirectSports();

        return $responseData[0]['data-content'][0][0]['sports'];
    }
}
