<?php

namespace App\Listeners;

use App\Modules\SalesChannels\Autoweb;

class AddAutowebDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private Autoweb $autoweb)
    {
        //
    }

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