<?php

namespace App\Listeners;

use App\Crm\StormMSDynamics;

class AddStormMsDynamicsDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private readonly StormMSDynamics $service)
    {
        //
    }

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