<?php

namespace App\Listeners;

use App\Crm\SendToSalesforce;

class AddSalesforceCrmDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private readonly SendToSalesforce $salesforce)
    {
        //
    }

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