<?php

namespace App\Jobs;

use App\Services\AutoTraderHub;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class AddDealerIdsToAutoTraderHub implements ShouldQueue
{
    use Dispatchable;
    use InteractsWithQueue;
    use Queueable;
    use SerializesModels;

    public function __construct(private readonly array $advertiserIds)
    {
    }

    public function handle(AutoTraderHub $service): void
    {
        $service->addDealerIds($this->advertiserIds);
    }
}
