<?php

namespace App\Listeners;

use App\Crm\SendToRapidRTC;

class AddRapidRtcDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private readonly SendToRapidRTC $rapidRTC)
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return array
     */
    public function handle($event)
    {
        if ($this->rapidRTC->enabled() == false) {
            return [];
        }
        return $this->rapidRTC->dealershipAdditionalDataFields();
    }
}
