<?php

namespace App\Listeners;

use App\Crm\SendToWebLeads;

class AddWebLeadsDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private SendToWebLeads $webLeads)
    {
        //
    }

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