<?php

namespace App\Listeners;

use App\Modules\SalesChannels\MotorsCoUk;

class AddMotorsCoUkDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private MotorsCoUk $motorsCoUk)
    {
        //
    }

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