<?php

namespace App\Listeners;

use App\Modules\Stock\DMSNavigator;

class AddDMSNavigatorDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private DMSNavigator $dmsNavigator)
    {
        //
    }

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