<?php

namespace App\Console\Commands;

use App\Jobs\RefreshFilterIndexJob;
use Illuminate\Console\Command;

class RefreshFilterIndex extends Command
{
    protected $signature = 'filter:refresh-index';

    protected $description = 'Dispatch filter index refresh as a queued job';

    public function handle(): int
    {
        RefreshFilterIndexJob::dispatch();

        $this->info('Filter index refresh job dispatched.');

        return self::SUCCESS;
    }
}
