<?php

namespace App\Console\Commands;

use Exception;
use Illuminate\Console\Command;
use Mtc\Modules\BasketRecovery\Classes\BasketRecovery;

class FollowUpsSendCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'followUps:run';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Run basket recovery';

    /**
     * Execute the console command.
     *
     * @return int
     * @throws Exception
     */
    public function handle(): int
    {
        if (! config('ecom.followups.enabled')) {
            return 0;
        }
        BasketRecovery::run();

        return 0;
    }
}
