<?php

namespace App\Listeners;

use App\Modules\SalesChannels\AaCars;

class AddAaCarsDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private AaCars $aaCars)
    {
        //
    }

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