<?php

namespace App\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

use App\Repository\BroadcastRepository;

#[AsCommand(
    name: 'investigation:broadcast',
    description: 'Add a short description for your command',
)]
class InvestigationBroadcastCommand extends Command
{
    /**
     * @param BroadcastRepository $broadcastRepository
     */
    public function __construct(
        private BroadcastRepository $broadcastRepository,
    ) {
        parent::__construct();
        $this->broadcastRepository = $broadcastRepository;
    }

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $output->writeln('Investigation Broadcast Command started');

        $broadcasts = $this->broadcastRepository->findBroadcast();

        foreach ($broadcasts as $broadcast) {
        }

        $output->writeln('Investigation Broadcast Command finished');
        return Command::SUCCESS;
    }
}
