<?php

namespace App\Listeners;

use App\Crm\SendToDealerWebLms;

class AddDealerWebDealershipFields
{
    /**
     * Create the event listener.
     *
     * @param SendToDealerWebLms $provider
     */
    public function __construct(private readonly SendToDealerWebLms $provider)
    {
        //
    }

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