<?php
namespace Incoviba\Command;

use Symfony\Component\Console;
use Incoviba\Common\Alias\Command;

#[Console\Attribute\AsCommand(
    name: 'run:full'
)]
class Full extends Command
{
    public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
    {
        $commands = [
            'comunas',
            'money:ipc',
            'money:uf',
            'proyectos:activos',
            'ventas:cierres:vigentes',
            'ventas:cuotas:hoy',
            'ventas:cuotas:pendientes',
            'ventas:cuotas:vencer'
        ];
        foreach ($commands as $command) {
            $cmd = new Console\Input\ArrayInput([
                'command' => $command
            ]);
            $this->getApplication()->doRun($cmd, $output);
        }
        return Command::SUCCESS;
    }
}
