<?php

namespace App\Listeners;

use App\Modules\SalesChannels\MotoNovo;

class AddMotoNovoDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private MotoNovo $provider)
    {
        //
    }

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